aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Collyer <ovcollyer@mac.com>2020-11-25 11:56:50 +0000
committerOliver Collyer <ovcollyer@mac.com>2020-11-25 11:56:50 +0000
commitb2c57f2ef9a6202fbd17883933fa336e1b94627e (patch)
treec4beb4bf298a1b00b139de4ef4c9b647eaf20dd8
parenta9884836f8b215900d69875784adbc987a863590 (diff)
parent78dd4e284027d9cdd9437c800bc4af570db8d032 (diff)
Merge branch 'master' into sokol-audio-avaudiosession
-rw-r--r--sokol_audio.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sokol_audio.h b/sokol_audio.h
index 47124592..4227f34d 100644
--- a/sokol_audio.h
+++ b/sokol_audio.h
@@ -1023,7 +1023,7 @@ _SOKOL_PRIVATE void _saudio_backend_shutdown(void) { };
#endif
/* NOTE: the buffer data callback is called on a separate thread! */
-_SOKOL_PRIVATE void _sapp_ca_callback(void* user_data, AudioQueueRef queue, AudioQueueBufferRef buffer) {
+_SOKOL_PRIVATE void _saudio_coreaudio_callback(void* user_data, AudioQueueRef queue, AudioQueueBufferRef buffer) {
_SOKOL_UNUSED(user_data);
if (_saudio_has_callback()) {
const int num_frames = buffer->mAudioDataByteSize / _saudio.bytes_per_frame;
@@ -1065,7 +1065,7 @@ _SOKOL_PRIVATE bool _saudio_backend_init(void) {
fmt.mBytesPerFrame = sizeof(float) * _saudio.num_channels;
fmt.mBytesPerPacket = fmt.mBytesPerFrame;
fmt.mBitsPerChannel = 32;
- OSStatus res = AudioQueueNewOutput(&fmt, _sapp_ca_callback, 0, NULL, NULL, 0, &_saudio.backend.ca_audio_queue);
+ OSStatus res = AudioQueueNewOutput(&fmt, _saudio_coreaudio_callback, 0, NULL, NULL, 0, &_saudio.backend.ca_audio_queue);
SOKOL_ASSERT((res == 0) && _saudio.backend.ca_audio_queue);
/* create 2 audio buffers */
@@ -1138,15 +1138,15 @@ _SOKOL_PRIVATE void* _saudio_alsa_cb(void* param) {
}
_SOKOL_PRIVATE bool _saudio_backend_init(void) {
- int dir; unsigned int rate;
+ int dir; unsigned int rate;
int rc = snd_pcm_open(&_saudio.backend.device, "default", SND_PCM_STREAM_PLAYBACK, 0);
if (rc < 0) {
SOKOL_LOG("sokol_audio.h: snd_pcm_open() failed");
return false;
}
- /* configuration works by restricting the 'configuration space' step
- by step, we require all parameters except the sample rate to
+ /* configuration works by restricting the 'configuration space' step
+ by step, we require all parameters except the sample rate to
match perfectly
*/
snd_pcm_hw_params_t* params = 0;