AudioDevice and bitperfect playback: setting bit depth (per channel)
AudioDevice and bitperfect playback: setting bit depth (per channel)
- Subject: AudioDevice and bitperfect playback: setting bit depth (per channel)
- From: "René J.V. Bertin" <email@hidden>
- Date: Tue, 04 Sep 2012 00:51:54 +0200
Hello,
I'm exploring a solution to change the default output device settings programatically so that it matches the content being played as closely as possible, to avoid conversion artefacts. I currently have code that sets the output sampling rate (as verified through A.M.S. and through perceptible aliasing*), but I haven't yet figured out if it's possible to set the bit depth (bits per channel).
In fact, the only reference I found to the bit depth is the AudioStreamBasicDescription.mBitsPerChannel , but if I do
propsize = sizeof(AudioStreamBasicDescription);
err = AudioDeviceGetProperty( mID, 0, mIsInput, kAudioDevicePropertyStreamFormat, &propsize, &mInitialFormat);
err = AudioDeviceSetProperty( mID, NULL, 0, mIsInput, kAudioDevicePropertyStreamFormat, sizeof(AudioStreamBasicDescription), &mInitialFormat );
with the bitdepth set to 32, I find that mInitialFormat.mBitsPerChannel==32, but after 'resetting' the device A.M.S. shows a bit depth of 16. There is no error, which seems logical as I just reset the hardware to its current settings.
Am I doing something wrong? How does A.M.S. manage this? I have a mid 2011 Macbook Pro 13" with Intel HD Audio running OS X 10.6.8. I've replace the AppleHDA.kext v2.0.8 with the 1.99f version as suggested on several fora. This reintroduced the line in input device but had no effect on the bit depth issue.
Thanks,
René
*) a 6450Hz sine sounds like a 50Hz signal with my USB speakers set to 6400Hz, and as the high note it is for all higher samplerate settings.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden