• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AudioFilePlayer & 4-channel wav file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: AudioFilePlayer & 4-channel wav file
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Efficient functions to convert 24 bit WAV audio into Float32
  • Next by Date: Re: notifying host of parameter changes
  • Previous by thread: Re: Efficient functions to convert 24 bit WAV audio into Float32
  • Next by thread: Re: AudioFilePlayer & 4-channel wav file
  • Index(es):
    • Date
    • Thread