• 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
Get selectRecordInput to show output channels in "input" pop-up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get selectRecordInput to show output channels in "input" pop-up


  • Subject: Get selectRecordInput to show output channels in "input" pop-up
  • From: James Udo Ludtke <email@hidden>
  • Date: Sun, 4 Dec 2005 17:19:41 -0500

I created a Xcode application that creates sound sequences using HAL. The programme runs fine with the sound sequences appearing at the Line Out. I now want to add a feature to save a sound sequence to a sound file using CoreAudio.

To get familiar with CoreAudio, I have been playing around with WhackedTV, which works fine.

I can create a sound file with WhackedTV, when my application and WhackedTV are running at the same time, AND I connect the headphone jack to Line In jack with a patch cord on my Dual 1.25 GHz G4.

My idea was to get WhackedTV to work from the Line Out, then to write the code in my application based on portions from WhackedTV.

However, all my efforts to modify WhackedTV to get Line Out into the Record Settings Line Input popup button ended in failure, showing my lack of knowledge of CoreAudio. I also noted that when the single item (Line In) in the input popup button is selected, the (unmodified) selectRecordInputmethod ends up in the bail section of the code.

I added some NSLog staments to the selectRecordInput method as follows:

// ---------------
- (IBAction)selectRecordInput:(id)sender
{
    OSStatus err = noErr;
    NSArray * list = nil;

    NSLog (@"arrived in selectRecordInput");       //  <- NSLog

BAILSETERR([mChan getPropertyWithClass: kQTPropertyClass_SGAudioRecordDevice
id: kQTSGAudioPropertyID_OutputListWithAttributes
size: sizeof(list)
address: &list
sizeUsed: NULL]);

if (list)
{
NSDictionary * selDict = [list objectAtIndex:[sender indexOfSelectedItem]];
UInt32 newSel =
[(NSNumber*)[selDict objectForKey:(id) kQTAudioDeviceAttribute_DeviceInputID]
unsignedIntValue];

BAILSETERR(
[self setSGAudioPropertyWithClass: kQTPropertyClass_SGAudioRecordDevice
id: kQTSGAudioPropertyID_InputSelection
size: sizeof(newSel)
address: &newSel] ); // this is line 556 referenced in ERR message
}

bail:
NSLog (@"arrived in selectRecordInput - bail:"); // <- NSLog
[list release];
return;
}


// ---------------

When I select the only input item in the "Line In" popup button, I get the following log output:

[Session started at 2005-11-28 00:55:08 -0500.]
2005-11-28 00:55:22.487 WhackedTV[1106] arrived in selectRecordInput
SGAudioSettings.mm:556:-[SGAudioSettings selectRecordInput:] ### Err -2195
2005-11-28 00:55:22.488 WhackedTV[1106] arrived in selectRecordInput - bail:


Is this intentional considering that there are really no options on the Line In popup button, or is this a bug.

Any hints how to code other source option onto the Line Input popup button in WhackedTV would be appreciated.

_______________________________________________
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: Get selectRecordInput to show output channels in "input" pop-up
      • From: Brad Ford <email@hidden>
  • Prev by Date: AudioOuputUnitStop
  • Next by Date: PhysicalFormat vs. VirtualFormat
  • Previous by thread: Re: AudioOuputUnitStop
  • Next by thread: Re: Get selectRecordInput to show output channels in "input" pop-up
  • Index(es):
    • Date
    • Thread