AVRecorder.AudioDeviceInfo
--------------------------

Queries details about audio device.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [AVRecorder](component_AVRecorder.md) | [6.1](newinversion61.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "AVRecorder.AudioDeviceInfo"; AVSession; Index; Selector ) 

**MBS**( **"AVRecorder.AudioDeviceInfo";** /\* Queries details about audio device. \*/  
**$AVSession**; /\* The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). \*/   
**$Index**; /\* The index of the device from 0 to [AVRecorder.AudioDeviceCount](AVRecorderAudioDeviceCount.md)-1 or the name or ID of the device.e.g. 0 \*/   
**$Selector**) /\* Which value to return.  
Can be ID, Name, Description, Index.  
On Mac can also be manufacturer, modelID, transportType, connected, inUseByAnotherApplication or suspended.e.g. "Name" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| AVSession | The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). | $AVSession |
| Index | The index of the device from 0 to [AVRecorder.AudioDeviceCount](AVRecorderAudioDeviceCount.md)-1 or the name or ID of the device. | 0 |
| Selector | Which value to return.   Can be ID, Name, Description, Index.   On Mac can also be manufacturer, modelID, transportType, connected, inUseByAnotherApplication or suspended. | "Name" |

### Result

Returns value or error.

### Description

Queries details about audio device.  
### Examples

Enumerate audio devices:

 # list audio devices   
Set Variable \[$count ; Value:MBS ("[AVRecorder.AudioDeviceCount](AVRecorderAudioDeviceCount.md)"; $recorder )\]  
If \[$count &gt; 0\]  
 Set Variable \[$index ; Value:0\]  
 Loop  
 # next  
 New Record/Request  
 Set Field \[AVRecorder Devices::Index ; $index \]  
 Set Field \[AVRecorder Devices::ID ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "ID")\]  
 Set Field \[AVRecorder Devices::Name ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "Name")\]  
 Set Field \[AVRecorder Devices::Description ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "Description")\]  
 If \[MBS ("[SystemInfo.isMacOSX](SystemInfoisMacOSX.md)")\]  
 Set Field \[AVRecorder Devices::Manufacturer ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "manufacturer")\]  
 Set Field \[AVRecorder Devices::ModelID ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "modelID")\]  
 Set Field \[AVRecorder Devices::TransportType ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "transportType")\]  
 Set Field \[AVRecorder Devices::Connected ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "connected")\]  
 Set Field \[AVRecorder Devices::inUseByAnotherApplication ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "inUseByAnotherApplication")\]  
 Set Field \[AVRecorder Devices::suspended ; MBS ("AVRecorder.AudioDeviceInfo"; $recorder ; $index ; "suspended")\]  
 End If  
 Set Field \[AVRecorder Devices::Type ; "Audio"\]  
 Commit Records/Requests \[\]  
 Set Variable \[$index ; Value:$index + 1\]  
 Exit Loop If \[$count = $index \]  
 End Loop  
End If  
### See also

- [AVRecorder.AudioDeviceCount](AVRecorderAudioDeviceCount.md)
- [AVRecorder.GetAudioDevice](AVRecorderGetAudioDevice.md)
- [AVRecorder.Init](AVRecorderInit.md)
- [AVRecorder.SetAudioDevice](AVRecorderSetAudioDevice.md)
- [AVRecorder.VideoDeviceInfo](AVRecorderVideoDeviceInfo.md)
- [SystemInfo.isMacOSX](SystemInfoisMacOSX.md)

### Release notes

- **Version 11.3**
    - Improved [AVRecorder.AudioDeviceInfo](https://www.mbsplugins.eu/AVRecorderAudioDeviceInfo.shtml), [AVRecorder.SetAudioDevice](https://www.mbsplugins.eu/AVRecorderSetAudioDevice.shtml), [AVRecorder.SetVideoDevice](https://www.mbsplugins.eu/AVRecorderSetVideoDevice.shtml) and [AVRecorder.VideoDeviceInfo](https://www.mbsplugins.eu/AVRecorderVideoDeviceInfo.shtml) to query device list automatically.

### Example Databases

- [AVRecorder/AV Recorder Record Dictation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AV%20Recorder%20Record%20Dictation.shtml#1ScriptAnchor_)
- [AVRecorder/AVRecorder Devices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AVRecorder%20Devices.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 11.3pr6](https://www.mbsplugins.de/archive/2021-07-06/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th February 2016 , last changed 19th February 2016

  
[AVRecorder.AudioDeviceCount](AVRecorderAudioDeviceCount.md) - [AVRecorder.AuthorizationStatusForMediaType](AVRecorderAuthorizationStatusForMediaType.md)

[HTML Version](AVRecorderAudioDeviceInfo.shtml)