• 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
Using mCoordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using mCoordinates


  • Subject: Using mCoordinates
  • From: 55 Ewan McDougall <email@hidden>
  • Date: Tue, 12 Jul 2005 09:44:37 +0100

Hello,

Using the code below and two functions declared in the apple example QTAudioExtractionPanel/QuickTimeAudioUtils.h (getTrackLayoutAndSize and setTrackLayout and size) the track channel layout is set.

I thought that by altering the mCoordinates [kAudioChannelCoordinates_LeftRight] I could alter the relative volume between 4 speakers, of this channel. At the moment no audio is being output, if I set kAudioChannelLayoutTag_Quadraphonic the audio is as expected. Should I be able to alter the relative volume between speakers using the mCoordinates variable?

int trackCount = GetMovieTrackCount(movie);
while(trackCount > 0)
{
Track track = GetMovieIndTrack(movie, trackCount);
if(track != nil)
{
Media media = GetTrackMedia(track);
if(media != nil)
{
OSType theTrackType;
GetMediaHandlerDescription(media, &theTrackType, 0, 0);
if(theTrackType == SoundMediaType && renderAudio == true)
{
SetTrackEnabled(track, true);
audioTrack = track;
getTrackLayoutAndSize(audioTrack, &trackChannelLayoutSize, &trackChannelLayout);


printf("trackChannelLayout\n");
//describe channel using mCoordinates
trackChannelLayout->mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions;


int numChannels = trackChannelLayout- >mNumberChannelDescriptions;
for(int i=0;i<numChannels;i++)
{
trackChannelLayout->mChannelDescriptions [i].mChannelLabel = kAudioChannelLabel_UseCoordinates;
trackChannelLayout->mChannelDescriptions [i].mChannelFlags = kAudioChannelFlags_RectangularCoordinates;
trackChannelLayout->mChannelDescriptions [i].mCoordinates[kAudioChannelCoordinates_LeftRight] = 0;
trackChannelLayout->mChannelDescriptions [i].mCoordinates[kAudioChannelCoordinates_BackFront] = 0;
trackChannelLayout->mChannelDescriptions [i].mCoordinates[kAudioChannelCoordinates_DownUp] = 0;
}
setTrackLayout(audioTrack, trackChannelLayoutSize, trackChannelLayout);



} else { SetTrackEnabled(track, false); } } } trackCount--;

Cheers,

Ewan
_______________________________________________
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


  • Prev by Date: Re: Variable-Variable Speed Playback
  • Next by Date: Re: Finding the attached Device Endpoint for External Devices
  • Previous by thread: Re: Finding the attached Device Endpoint for External Devices
  • Next by thread: Edirol and Coreaudio?
  • Index(es):
    • Date
    • Thread