diff options
author | Michael L Dickens | 2012-02-16 11:57:22 -0500 |
---|---|---|
committer | Johnathan Corgan | 2012-02-16 10:13:17 -0800 |
commit | 12311ad384cd494bbab1a4ffb0b8699f28569e1b (patch) | |
tree | b6ae4cfca7391b799d4e7dff8223b438d3264120 /gr-audio/lib/osx | |
parent | 861b084aaae054d70e0f770a695359265c35e20c (diff) | |
download | gnuradio-12311ad384cd494bbab1a4ffb0b8699f28569e1b.tar.gz gnuradio-12311ad384cd494bbab1a4ffb0b8699f28569e1b.tar.bz2 gnuradio-12311ad384cd494bbab1a4ffb0b8699f28569e1b.zip |
small tweaks to get stream sizes "more correct"
Diffstat (limited to 'gr-audio/lib/osx')
-rw-r--r-- | gr-audio/lib/osx/audio_osx_source.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gr-audio/lib/osx/audio_osx_source.cc b/gr-audio/lib/osx/audio_osx_source.cc index a6dd81908..6c5609d20 100644 --- a/gr-audio/lib/osx/audio_osx_source.cc +++ b/gr-audio/lib/osx/audio_osx_source.cc @@ -319,7 +319,6 @@ audio_osx_source::audio_osx_source (int sample_rate, d_deviceSampleRate = asbd_device.mSampleRate; d_n_deviceChannels = asbd_device.mChannelsPerFrame; - asbd_client.mChannelsPerFrame = d_n_deviceChannels; asbd_client.mSampleRate = asbd_device.mSampleRate; asbd_client.mFormatID = kAudioFormatLinearPCM; asbd_client.mFormatFlags = (kAudioFormatFlagIsFloat | @@ -329,9 +328,10 @@ audio_osx_source::audio_osx_source (int sample_rate, (d_n_deviceChannels == 1)) { asbd_client.mFormatFlags &= ~kLinearPCMFormatFlagIsNonInterleaved; } - asbd_client.mBitsPerChannel = 32; - asbd_client.mBytesPerFrame = asbd_client.mBitsPerChannel / 8; + asbd_client.mBytesPerFrame = sizeof (float); asbd_client.mFramesPerPacket = 1; + asbd_client.mBitsPerChannel = asbd_client.mBytesPerFrame * 8; + asbd_client.mChannelsPerFrame = d_n_deviceChannels; asbd_client.mBytesPerPacket = asbd_client.mBytesPerFrame; propertySize = sizeof(AudioStreamBasicDescription); @@ -352,11 +352,11 @@ audio_osx_source::audio_osx_source (int sample_rate, GR_PCM_ENDIANNESS | kLinearPCMFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved); - asbd_user.mBytesPerPacket = 4; + asbd_user.mBytesPerPacket = sizeof (float); asbd_user.mFramesPerPacket = 1; - asbd_user.mBytesPerFrame = 4; - asbd_user.mChannelsPerFrame = d_n_max_channels; - asbd_user.mBitsPerChannel = 32; + asbd_user.mBytesPerFrame = asbd_user.mBytesPerPacket; + asbd_user.mChannelsPerFrame = d_n_deviceChannels; + asbd_user.mBitsPerChannel = asbd_user.mBytesPerPacket * 8; if (d_deviceSampleRate == d_outputSampleRate) { // no need to do conversion if asbd_client matches user wants |