• 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
Re: Why Does Mono File Play as Stereo?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why Does Mono File Play as Stereo?


  • Subject: Re: Why Does Mono File Play as Stereo?
  • From: William Stewart <email@hidden>
  • Date: Tue, 24 Feb 2009 18:07:40 -0800

you need to set the channel map - see my previous email on exactly this topic

On Feb 24, 2009, at 4:23 PM, Bob Ingraham wrote:

I have an mp3 file that was recorded mono (1 channel), 44.1kHz.

When I play it with the SimpleSDK/PlayFile demo, it plays on both left/right channels of the output device.

I tried modifying the PlayFile SimpleGraph() routine to modify the AUHAL output unit using the kAudioFilePropertyChannelLayout property, but it says that I am evil and I returns error -10851 (kAudioUnitErr_InvalidPropertyValue).

What am I doing wrong?

	AudioChannelLayout chanLayout;
	AUNode outputNode;
	AudioUnit auOutput;

	AUGraphAddNode (theGraph, &cd, &outputNode);
       AUGraphOpen (theGraph);
       AUGraphNodeInfo(theGraph, outputNode, &myCd, &auOutput);

// Set channel layout
memset(&chanLayout, 0, sizeof(chanLayout));
chanLayout.mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelBitmap | kAudioChannelLayoutTag_Mono;
chanLayout.mChannelBitmap = kAudioChannelBit_Left;

err = AudioUnitSetProperty(auOutput, kAudioUnitProperty_AudioChannelLayout, kAudioUnitScope_Output, 1, &chanLayout, sizeof(chanLayout));
if (err != noErr)
{
printf("Failed to set Audio Channel Layout: %d\n", err);
}


Thanks,
Bob
_______________________________________________
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

_______________________________________________ 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
References: 
 >Why Does Mono File Play as Stereo? (From: Bob Ingraham <email@hidden>)

  • Prev by Date: Re: Output Channel Selection Redux
  • Next by Date: Re: Output Channel Selection Redux
  • Previous by thread: Why Does Mono File Play as Stereo?
  • Next by thread: Re: Why Does Mono File Play as Stereo?
  • Index(es):
    • Date
    • Thread