AvFoundation recording

H there
I recently got all the MBS plains - AVfoundation audio stuff is what I’m most interested in.
This goes out to anyone who has been working with the MBS Avfoundation plugins.

I can record (base off the AVAudio Recorder Example. It records, creates a wave picture, can play it back, and change the rate.

What I’m after is 2 things:

  1. a way to list the audio inputs in a combo and choose by selecting one for the input
  2. A way of getting the input recording meter levels

I reckon, as there are quite a lot of programers that are musicians, we should create a thread exclusively for this to search for tip and give advise about making music and video with Xojo!

maybe this helps you?

[code] dim devices() as AVCaptureDeviceMBS = AVCaptureDeviceMBS.devicesWithMediaType(AVFoundationMBS.AVMediaTypeAudio)
dim names() as string

for each d as AVCaptureDeviceMBS in devices
names.Append d.localizedName

// show all names of audio devices in a message dialog
MsgBox Join(names, EndOfLine)[/code]

to enumerate audio devices and you can add them to the combobox.
Keep also the AVCaptureDeviceMBS object, so you can later use it.

for level meter, maybe you check the AVAudioNodeMBS classes.
With AVAudioUnitMBS we have level metering.

Legend - I’ll give that a go!

Great I got the audio inputs loaded into my combobox! That’s cool!

How do I select the input I want to record from?

I found this under AVAudioUnitMBS

LevelMonitor(Level0 as Double, Level1 as Double, Level2 as Double, Level3 as Double, Level4 as Double, Level5 as Double, Level6 as Dou- ble, Level7 as Double, tag as Variant)

how do I use this in order to get an input level from channel 0 and 1?

You mix different things.
Please try the examples and learn about the classes.

Either you go with the AVCapture* classes here

or with the audio nodes here: