Exports for User.
More...
|
| enum | SceUsbAudioInErrorCode {
SCE_USBAUDIO_IN_ERROR_INVALID_ARGUMENT = 0x803e0001
, SCE_USBAUDIO_IN_ERROR_DUPLICATE_ID = 0x803e0002
, SCE_USBAUDIO_IN_ERROR_NO_MEMORY = 0x803e0003
, SCE_USBAUDIO_IN_ERROR_DEVICE_NOT_FOUND = 0x803e0004
,
SCE_USBAUDIO_IN_ERROR_NOT_SUPPORTED = 0x803e0005
, SCE_USBAUDIO_IN_ERROR_CANNOT_GET_PORT_OWNERSHIP = 0x803e0006
, SCE_USBAUDIO_IN_ERROR_PORT_IS_ALREADY_OPENED = 0x803e0007
, SCE_USBAUDIO_IN_ERROR_PROCESS_HAS_NOT_A_DEVICE_OWNERSHIP = 0x803e0008
,
SCE_USBAUDIO_IN_ERROR_FAILED_TO_READ_STREAM = 0x803e0009
, SCE_USBAUDIO_IN_ERROR_DEVICE_WAS_HALTED = 0x803e000a
, SCE_USBAUDIO_IN_ERROR_NO_DATA_TO_READ = 0x803e000b
, SCE_USBAUDIO_IN_ERROR_FAILED_TO_COPY_BUFFER = 0x803e000c
,
SCE_USBAUDIO_IN_ERROR_FAILED_TO_REQUEST_ISOCHRONOUS = 0x803e000d
, SCE_USBAUDIO_IN_ERROR_TIMEOUT = 0x803e000e
, SCE_USBAUDIO_IN_ERROR_PROCESS_CANNOT_OPEN_MORE_DEVICE = 0x803e000f
} |
| |
|
| | VITASDK_BUILD_ASSERT_EQ (0x18, SceUsbAudioInDeviceInfo) |
| |
| | VITASDK_BUILD_ASSERT_EQ (4, SceUsbAudioInDeviceListItem) |
| |
| SceInt32 | sceUsbAudioInOpenDevice (SceUInt32 device_id, int bits, int rate) |
| | Open usb audio device.
|
| |
| SceInt32 | sceUsbAudioInCloseDevice (SceUInt32 device_id) |
| | Close usb audio device.
|
| |
| SceInt32 | sceUsbAudioInGetDeviceIdList (SceUsbAudioInDeviceListItem *list, SceUInt32 *device_count, SceUInt32 list_size) |
| | Get available audio usb devices.
|
| |
| SceInt32 | sceUsbAudioInGetDeviceInformation (SceUInt32 device_id, SceUsbAudioInDeviceInfo *info) |
| | Get usb audio device info.
|
| |
| SceInt32 | sceUsbAudioInGetMaxValueOfVolume (SceUInt32 device_id, SceUInt32 *volume) |
| | Get usb audio device max volume.
|
| |
| SceInt32 | sceUsbAudioInGetMinValueOfVolume (SceUInt32 device_id, SceUInt32 *volume) |
| | Get usb audio device min volume.
|
| |
| SceInt32 | sceUsbAudioInSetCurrentValueOfVolume (SceUInt32 device_id, SceUInt32 volume) |
| | Set usb audio device volume.
|
| |
| SceInt32 | sceUsbAudioInInput (SceUInt32 device_id, void *buffer) |
| | Receive sound data from usb device.
|
| |
Exports for User.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
◆ SceUsbAudioInDeviceInfo
| struct SceUsbAudioInDeviceInfo |
| Data Fields |
|
uint16_t |
vendor |
|
|
uint16_t |
product |
|
|
SceUInt32 |
_reserved[5] |
|
◆ SceUsbAudioInDeviceListItem
| struct SceUsbAudioInDeviceListItem |
◆ SceUsbAudioInErrorCode
| Enumerator |
|---|
| SCE_USBAUDIO_IN_ERROR_INVALID_ARGUMENT | |
| SCE_USBAUDIO_IN_ERROR_DUPLICATE_ID | |
| SCE_USBAUDIO_IN_ERROR_NO_MEMORY | |
| SCE_USBAUDIO_IN_ERROR_DEVICE_NOT_FOUND | |
| SCE_USBAUDIO_IN_ERROR_NOT_SUPPORTED | |
| SCE_USBAUDIO_IN_ERROR_CANNOT_GET_PORT_OWNERSHIP | |
| SCE_USBAUDIO_IN_ERROR_PORT_IS_ALREADY_OPENED | |
| SCE_USBAUDIO_IN_ERROR_PROCESS_HAS_NOT_A_DEVICE_OWNERSHIP | |
| SCE_USBAUDIO_IN_ERROR_FAILED_TO_READ_STREAM | |
| SCE_USBAUDIO_IN_ERROR_DEVICE_WAS_HALTED | |
| SCE_USBAUDIO_IN_ERROR_NO_DATA_TO_READ | |
| SCE_USBAUDIO_IN_ERROR_FAILED_TO_COPY_BUFFER | |
| SCE_USBAUDIO_IN_ERROR_FAILED_TO_REQUEST_ISOCHRONOUS | |
| SCE_USBAUDIO_IN_ERROR_TIMEOUT | |
| SCE_USBAUDIO_IN_ERROR_PROCESS_CANNOT_OPEN_MORE_DEVICE | |
◆ VITASDK_BUILD_ASSERT_EQ() [1/2]
◆ VITASDK_BUILD_ASSERT_EQ() [2/2]
◆ sceUsbAudioInOpenDevice()
Open usb audio device.
- Returns
- 0 on success, < 0 on error
- Parameters
-
| [in] | device_id | - Device id |
| [in] | bits | - Bits per sample. Only 16 allowed |
| [in] | rate | - Bitrate in Hz. Only 48000 allowed |
◆ sceUsbAudioInCloseDevice()
Close usb audio device.
- Returns
- 0 on success, < 0 on error
- Parameters
-
◆ sceUsbAudioInGetDeviceIdList()
Get available audio usb devices.
- Returns
- 0 on success, < 0 on error
- Parameters
-
- Note
- While function accepts up to 127 as list_size it can only return maximum 7 devices
◆ sceUsbAudioInGetDeviceInformation()
Get usb audio device info.
- Returns
- 0 on success, < 0 on error
- Parameters
-
◆ sceUsbAudioInGetMaxValueOfVolume()
Get usb audio device max volume.
- Returns
- 0 on success, < 0 on error
- Parameters
-
| [in] | device_id | - Device id |
| [out] | volume | - maximum device volume |
- Note
- You should sceUsbAudioInOpenDevice first to use this function
◆ sceUsbAudioInGetMinValueOfVolume()
Get usb audio device min volume.
- Returns
- 0 on success, < 0 on error
- Parameters
-
| [in] | device_id | - Device id |
| [out] | volume | - minimum device volume |
- Note
- You should sceUsbAudioInOpenDevice first to use this function
◆ sceUsbAudioInSetCurrentValueOfVolume()
Set usb audio device volume.
- Returns
- 0 on success, < 0 on error
- Parameters
-
| [in] | device_id | - Device id |
| [in] | volume | - new device volume |
- Note
- You should sceUsbAudioInOpenDevice first to use this function
◆ sceUsbAudioInInput()
Receive sound data from usb device.
- Returns
- 0 on success, < 0 on error
- Parameters
-
| [in] | device_id | - Device id |
| [out] | buffer | - buffer for received data. Should be 0x600 bytes in size. |
- Note
- You should call sceUsbAudioInOpenDevice first to use this function
-
Data is in S16_MONO format. Granularity is 768 (thus buffer is 768*2)
◆ vendor
| uint16_t SceUsbAudioInDeviceInfo::vendor |
◆ product
| uint16_t SceUsbAudioInDeviceInfo::product |
◆ _reserved
| SceUInt32 SceUsbAudioInDeviceInfo::_reserved[5] |
◆ device_id
| SceUInt32 SceUsbAudioInDeviceListItem::device_id |