AudioFilePlayer & 4-channel wav file
AudioFilePlayer & 4-channel wav file
- Subject: AudioFilePlayer & 4-channel wav file
- From: Mike Aizatsky <email@hidden>
- Date: Sun, 23 Oct 2005 13:12:25 +0400
Hi!
I've successfully set up an AU graph: file player -> mixer -> effect
-> output unit. Everything works correctly, until I'm feeding the
4-channel wav file into file player. Despite all my efforts it still
has only 2 channels on exit.
Here's the file format description:
- - - - - - - - - - - - - - - - - - - -
Sample Rate:22050.000000
Format ID:lpcm
Format Flags:C
Bytes per Packet:8
Frames per Packet:1
Bytes per Frame:8
Channels per Frame:4
Bits per Channel:16
- - - - - - - - - - - - - - - - - - - -
For this file, AUFilePlayer says it has the following output format:
- - - - - - - - - - - - - - - - - - - -
Sample Rate:44100.000000
Format ID:lpcm
Format Flags:2B
Bytes per Packet:4
Frames per Packet:1
Bytes per Frame:4
Channels per Frame:2
Bits per Channel:32
- - - - - - - - - - - - - - - - - - - -
It even ignore my manual output format setup:
------------------------
AudioStreamBasicDescription filePlayerDesc;
dataSize = sizeof(AudioStreamBasicDescription);
filePlayerDesc.mFormatID = kAudioFormatLinearPCM;
filePlayerDesc.mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
filePlayerDesc.mBitsPerChannel = 32;
filePlayerDesc.mChannelsPerFrame = 4;
filePlayerDesc.mFramesPerPacket = 1;
filePlayerDesc.mBytesPerPacket = filePlayerDesc.mBytesPerFrame =
sizeof(Float32) * filePlayerDesc.mChannelsPerFrame;
filePlayerDesc.mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
verify_noerr( AudioUnitSetProperty(myFilePlayerUnit,
kAudioUnitProperty_StreamFormat,kAudioUnitScope_Output,0,&filePlayerDesc,dataSize));
----------------------------
Any hints, how can I have 4 channels of output to mix it in the mixer
from file player unit?
--
Regards,
Mike
_______________________________________________
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