diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-20 18:53:42 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-20 18:53:42 +0000 |
commit | e59c11393b3c30b29bbf3176f2771cfae9b5cd1f (patch) | |
tree | 19c7be16ae09fee105f2fd78b45d1daa65052868 | |
parent | 32d448c470861924648bed914d7d86b59e9dfeda (diff) | |
download | hqemu-e59c11393b3c30b29bbf3176f2771cfae9b5cd1f.zip hqemu-e59c11393b3c30b29bbf3176f2771cfae9b5cd1f.tar.gz |
make the number of buffers settable (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1638 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | audio/coreaudio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 6afc55c..534fb3e 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -33,9 +33,11 @@ struct { int buffer_frames; + int nbuffers; int isAtexit; } conf = { .buffer_frames = 512, + .nbuffers = 4, .isAtexit = 0 }; @@ -393,7 +395,7 @@ static int coreaudio_init_out (HWVoiceOut *hw, audsettings_t *as) "Could not get device buffer frame size\n"); return -1; } - hw->samples = 4 * core->audioDevicePropertyBufferFrameSize; + hw->samples = conf.nbuffers * core->audioDevicePropertyBufferFrameSize; /* get StreamFormat */ propertySize = sizeof(core->outputStreamBasicDescription); @@ -527,6 +529,8 @@ static void coreaudio_audio_fini (void *opaque) static struct audio_option coreaudio_options[] = { {"BUFFER_SIZE", AUD_OPT_INT, &conf.buffer_frames, "Size of the buffer in frames", NULL, 0}, + {"BUFFER_COUNT", AUD_OPT_INT, &conf.nbuffers, + "Number of buffers", NULL, 0}, {NULL, 0, NULL, NULL, NULL, 0} }; |