Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #145

Merged
merged 5 commits into from Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/FAudio.c
Expand Up @@ -467,7 +467,7 @@ uint32_t FAudio_CreateSourceVoice(
((*ppSourceVoice)->src.decodeSamples + EXTRA_DECODE_PADDING) * (*ppSourceVoice)->src.format->nChannels
);

LOG_INFO(audio, "-> %p", *ppSourceVoice)
LOG_INFO(audio, "-> %p", (void *)(*ppSourceVoice))

/* Add to list, finally. */
LinkedList_PrependEntry(
Expand Down Expand Up @@ -1610,9 +1610,9 @@ uint32_t FAudioVoice_SetOutputFilterParameters(
LOG_ERROR(
voice->audio,
"Destination not attached to source: %p %p",
voice,
pDestinationVoice
);
(void *) voice,
(void *) pDestinationVoice
)
FAudio_PlatformUnlockMutex(voice->sendLock);
LOG_MUTEX_UNLOCK(voice->audio, voice->sendLock)
LOG_API_EXIT(voice->audio)
Expand Down Expand Up @@ -1678,9 +1678,9 @@ void FAudioVoice_GetOutputFilterParameters(
LOG_ERROR(
voice->audio,
"Destination not attached to source: %p %p",
voice,
pDestinationVoice
);
(void *) voice,
(void *) pDestinationVoice
)
FAudio_PlatformUnlockMutex(voice->sendLock);
LOG_MUTEX_UNLOCK(voice->audio, voice->sendLock)
LOG_API_EXIT(voice->audio)
Expand Down Expand Up @@ -1858,9 +1858,9 @@ uint32_t FAudioVoice_SetOutputMatrix(
LOG_ERROR(
voice->audio,
"Destination not attached to source: %p %p",
voice,
pDestinationVoice
);
(void *) voice,
(void *) pDestinationVoice
)
FAudio_PlatformUnlockMutex(voice->sendLock);
LOG_MUTEX_UNLOCK(voice->audio, voice->sendLock)
LOG_API_EXIT(voice->audio)
Expand Down Expand Up @@ -1918,9 +1918,9 @@ void FAudioVoice_GetOutputMatrix(
LOG_ERROR(
voice->audio,
"Destination not attached to source: %p %p",
voice,
pDestinationVoice
);
(void *) voice,
(void *) pDestinationVoice
)
FAudio_PlatformUnlockMutex(voice->sendLock);
LOG_MUTEX_UNLOCK(voice->audio, voice->sendLock)
LOG_API_EXIT(voice->audio)
Expand Down Expand Up @@ -2183,10 +2183,10 @@ uint32_t FAudioSourceVoice_SubmitSourceBuffer(
LOG_INFO(
voice->audio,
"%p: {Flags: 0x%x, AudioBytes: %u, pAudioData: %p, Play: %u + %u, Loop: %u + %u x %u}",
voice,
(void *) voice,
pBuffer->Flags,
pBuffer->AudioBytes,
pBuffer->pAudioData,
(const void *) pBuffer->pAudioData,
pBuffer->PlayBegin,
pBuffer->PlayLength,
pBuffer->LoopBegin,
Expand Down
14 changes: 7 additions & 7 deletions src/FAudio_internal.c
Expand Up @@ -90,7 +90,7 @@ void FAudio_INTERNAL_debug(
va_end(va);

/* Print, finally. */
FAudio_Log(output);
FAudio_Log(output)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an error, isn't it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to help find bugs :)

}

static const char *get_wformattag_string(const FAudioWaveFormatEx *fmt)
Expand Down Expand Up @@ -411,12 +411,12 @@ static void FAudio_INTERNAL_DecodeBuffers(
LOG_INFO(
voice->audio,
"Voice %p, buffer %p, decoded %u samples from [%u,%u)",
voice,
buffer,
(void *) voice,
(void *) buffer,
endRead,
voice->src.curBufferOffset,
voice->src.curBufferOffset + endRead
);
)

decoded += endRead;
voice->src.curBufferOffset += endRead;
Expand Down Expand Up @@ -459,9 +459,9 @@ static void FAudio_INTERNAL_DecodeBuffers(
LOG_INFO(
voice->audio,
"Voice %p, finished with buffer %p",
voice,
buffer
);
(void *) voice,
(void *) buffer
)

/* Change active buffer, delete finished buffer */
toDelete = voice->src.bufferList;
Expand Down
2 changes: 1 addition & 1 deletion src/FAudio_internal.h
Expand Up @@ -731,7 +731,7 @@ FAudioThread FAudio_PlatformCreateThread(
);
void FAudio_PlatformWaitThread(FAudioThread thread, int32_t *retval);
void FAudio_PlatformThreadPriority(FAudioThreadPriority priority);
uint64_t FAudio_PlatformGetThreadID();
uint64_t FAudio_PlatformGetThreadID(void);
FAudioMutex FAudio_PlatformCreateMutex(void);
void FAudio_PlatformDestroyMutex(FAudioMutex mutex);
void FAudio_PlatformLockMutex(FAudioMutex mutex);
Expand Down
2 changes: 1 addition & 1 deletion src/FAudio_platform_sdl2.c
Expand Up @@ -271,7 +271,7 @@ void FAudio_PlatformThreadPriority(FAudioThreadPriority priority)
SDL_SetThreadPriority((SDL_ThreadPriority) priority);
}

uint64_t FAudio_PlatformGetThreadID()
uint64_t FAudio_PlatformGetThreadID(void)
{
return (uint64_t) SDL_ThreadID();
}
Expand Down