@platform ios
@detail api
@author dixing
@brief Get the list of audio capture devices.
@return The list of audio capture devices.. See ByteRTCDeviceCollection{@link #ByteRTCDeviceCollection}.
If a time-out occurs, it returns an empty list. By default, the time-out duration is set to 10 seconds. We recommend to call this API once you get notification of ByteRTCMediaDeviceListUpdated via rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error}.
@note When receiving rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error} for device change, you can call this API to get the latest list of audio playback devices.
@platform ios
@detail api
@author dixing
@brief Gets the list of the audio playback devices.
@return The list of all audio playback devices. See ByteRTCDeviceCollection{@link #ByteRTCDeviceCollection}.
If a time-out occurs, it returns an empty list. By default, the time-out duration is set to 10 seconds. We recommend to call this API once you get notification of ByteRTCMediaDeviceListUpdated via rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error}.
@note When receiving rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error} for audio playback device change, you can call this API to get the latest list of audio playback devices.
@platform ios
@detail api
@author yezijian.me
@brief Set the audio capture device to follow the OS default setting or not.
@param followed
- true: follow the OS setting. You can not call setAudioCaptureDevice:{@link #ByteRTCAudioDeviceManager#setAudioCaptureDevice} at the same time. The default value.
- false: do not follow the OS setting. You can call setAudioCaptureDevice:{@link #ByteRTCAudioDeviceManager#setAudioCaptureDevice} to set the audio capture device.
@platform ios
@detail api
@author yezijian.me
@brief Set the audio playback device to follow the OS default setting or not.
@param followed
- true: follow the OS setting. You can not call setAudioPlaybackDevice:{@link #ByteRTCAudioDeviceManager#setAudioPlaybackDevice} at the same time. The default value.
- false: do not follow the OS setting. You can call setAudioPlaybackDevice:{@link #ByteRTCAudioDeviceManager#setAudioPlaybackDevice} to set the audio playback device.
@platform ios
@detail api
@author dixing
@brief Gets information about the mute state of the current audio capture device.
@param mute
- true: Mute
- false: Speaking
@return Method call result
- 0: Success.
- < 0: failure
@platform ios
@detail api
@author dixing
@brief Get the mute state of the current audio playback device.
@param mute
- true: Mute
- false: Speaking
@return Method call result
- 0: Success.
- < 0: failure
@platform ios
@detail api
@author dixing
@brief Try to initialize the audio capture device for device test.
@param deviceID device ID
@return Device status error code:
- 0: Status normal.
- -1: Test not executed.
- -2: Init failed due to lack of permission.
- -3: The device does not exist. No device or device removed.
- -4: The audio format is not supported.
- -5: Error for other reasons
@note
- Call this API before joining the room;
- You may still fail to enable the device even you passed the test. Occupation by other application or shortage of CPU / memory may cause the failure.
@platform ios
@detail api
@author dixing
@brief Try to initialize the audio playback device for device test.
@param deviceID Device ID
@return Device status error code:
- 0: Status normal.
- -1: Test not executed.
- -2: Init failed due to lack of permission.
- -3: The device does not exist. No device or device removed.
- -4: The audio format is not supported.
- -5: Error for other reasons
@note
- Call this API before the user joins the room.
- You may still fail to enable the device even you passed the test. Occupation by other application or shortage of CPU / memory may cause the failure.
@platform ios
@detail api
@author dixing
@brief Set the audio capture devices.
@param deviceID Audio capture device ID. You can get the device list by calling enumerateAudioCaptureDevices{@link #ByteRTCAudioDeviceManager#EnumerateAudioCaptureDevices}.
@return Method call result
- 0: Success.
- < 0: failure
@note After you call followSystemCaptureDevice:{@link #ByteRTCAudioDeviceManager#followSystemCaptureDevice} to set the audio playback device to follow the system setting, you cannot call this API to set the audio capture device.
@platform ios
@detail api
@author dixing
@brief Set the mute state of the current audio capture device. It's not mute by default.
@param mute
- true: Mute
- false: Speaking
@return Method call result
- 0: Success.
- < 0: failure
@platform ios
@detail api
@author dixing
@brief Set the current audio capture device volume
@param volume Audio capture device volume. The range is 0,255.
- 0,25: nearly silent;
- 25,75: low volume;
- 76,204: medium volume;
- 205,255: high volume.
@return Method call result
- 0: Success. The volume information returned by rtcEngine:onLocalAudioPropertiesReport:{@link #ByteRTCEngineDelegate#rtcEngine:onLocalAudioPropertiesReport} will be changed according to this value.
- < 0: failure
@platform ios
@detail api
@author dixing
@brief Sets the audio playback device.
@param deviceID Device ID. You can get the ID by calling EnumerateAudioPlaybackDevices{@link #ByteRTCAudioDeviceManager#EnumerateAudioPlaybackDevices}.
@return
- 0: Success
- < 0: Failure
@note After you call followSystemPlaybackDevice:{@link #ByteRTCAudioDeviceManager#followSystemPlaybackDevice} to set the audio playback device to follow the system setting, you cannot call this API to set the audio playback device.
@platform ios
@detail api
@author dixing
@brief Set the mute state of the current audio playback device. It's not mute by default.
@param mute
- true: Mute
- false: Speaking
@return Method call result
- 0: Success.
- < 0: failure
@platform ios
@detail api
@author dixing
@brief Begins audio device loop testing.
This method tests whether the audio capture device and the audio playback device can work normally. Once the test starts, the audio capture device will capture the local sound
And play it out through the audio playback device, and the user App will receive the volume information reported by the OnLocalAudioPropertiesReport callback.
@param indicationInterval The time interval of receiving callbacks in ms. It is recommended to set to no less than 200 ms. The minimum is 10 ms.
@return Method call result
- 0: Success.
- < 0: failure
@note
- This method do not rely on rtcEngine
- This method must be called before joining the room. And cannot be applied at the same time as other audio equipment test functions.
- You need to call stopAudioDeviceLoopbackTest{@link #ByteRTCAudioDeviceManager#stopAudioDeviceLoopbackTest} to stop the test.
- This method only tests audio equipment locally and does not involve network connection.
@platform ios
@detail api
@author dixing
@brief Start the audio capture device test.
This method tests whether the audio capture device can work properly. After starting the test, you will receive the volume information reported by rtcEngine:onLocalAudioPropertiesReport:{@link #ByteRTCEngineDelegate#rtcEngine:onLocalAudioPropertiesReport}.
@param indicationInterval The interval of receiving callbacks. It is recommended to set to no less than 200 ms. The minimum is 10 ms.
@return Method call result
- 0: Success.
- < 0: failure
@note
- This method do not rely on rtcEngine
- This method must be called before joining the room and cannot be applied at the same time as other audio device testing functions.
- You need to call stopAudioRecordingDeviceTest{@link #ByteRTCAudioDeviceManager#stopAudioRecordingDeviceTest} to stop the test.
@platform ios
@detail api
@author dixing
@brief Stop audio device loop testing.
@return Method call result
- 0: Success.
- < 0: failure
@note
- This method do not rely on rtcEngine
- After calling startAudioDeviceLoopbackTest:{@link #ByteRTCAudioDeviceManager#startAudioDeviceLoopbackTest}, you need to call this method to stop the test.
@platform ios
@detail api
@author dixing
@brief Stop audio capture device testing.
@return Method call result
- 0: Success.
- < 0: failure
@note
- This method do not rely on rtcEngine
+After calling startAudioRecordingDeviceTest:{@link #ByteRTCAudioDeviceManager#startAudioRecordingDeviceTest}, you must call this method to stop the test.
@detail api
@brief Start the capture and playback test for local audio devices.
@param interval During the test, you'll receive enableAudioPropertiesReport periodically. Set the period in ms with this parameter. Recommended value is 200 ms; the minimal value is 10 ms.
@return result
- 0: success
- < 0: failure
@note
- The audio capturing stops in 30s after calling this API and begins to play the recording audio. Before that, you can call stopAudioDeviceRecordAndPlayTest{@link #IRTCAudioDeviceManager#stopAudioDeviceRecordAndPlayTest} to stop audio capturing and start playing the recording audio.
- Call stopAudioDevicePlayTest{@link #IRTCAudioDeviceManager#stopAudioDevicePlayTest} to stop the test, including capturing and playing the recording.
- You must stop the test before starting another test for audio devices.
- You must stop the test before calling enableAudioPropertiesReport.
- This test performs locally and does not involve network connection testing.
@detail api
@brief Start the playback test for the local audio device. RTC will start playing the audio file specified. And RTC will notify the audio volume via the onAudioPlaybackDeviceTestVolume periodically.
@param testAudioFilePath Specify the path of the audio file for the playback test, including *.mp3, *.aac, *.m4a, *.3gp, and *.wav.
@param interval The time interval between each onAudioPlaybackDeviceTestVolume callback in milliseconds. We recommend setting it to 200 ms. The minimal value is 10 ms.
@return
- 0: Success
- < 0: Failure
@note
- You can call this API whether the user is in the room.
- Call stopAudioPlaybackDeviceTest{@link #IRTCAudioDeviceManager#stopAudioPlaybackDeviceTest} to stop the playback test before moving on to the other device tests.
@detail api
@brief Stop the capture and playback test for local audio devices which is started by calling startAudioDeviceRecordTest{@link #IRTCAudioDeviceManager#startAudioDeviceRecordTest}.
Before the test ends by itself, you can call this API to stop the recording or playing.
@return
- 0: Success
- < 0: Failure
@detail api
@brief Call this API to stop recording in the test and start to play the recording in 30 s after calling startAudioDeviceRecordTest{@link #IRTCAudioDeviceManager#startAudioDeviceRecordTest}.
@return Result
- 0: Success
- < 0: Failure
@note After calling this API, the recording starts playing during which you can call stopAudioDevicePlayTest{@link #IRTCAudioDeviceManager#stopAudioDevicePlayTest} to stop playing.
@detail api
@author dixing
@brief Stop the playback test for the local audio device.
@return Result
- 0: Success
- < 0: Failure
@note Call this API to stop the playback test started by calling startAudioPlaybackDeviceTest{@link #IRTCAudioDeviceManager#startAudioPlaybackDeviceTest} before moving on to the other device tests.