vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceUsbAudioIn_stub



Functions

 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. More...
 
SceInt32 sceUsbAudioInCloseDevice (SceUInt32 device_id)
 Close usb audio device. More...
 
SceInt32 sceUsbAudioInGetDeviceIdList (SceUsbAudioInDeviceListItem *list, SceUInt32 *device_count, SceUInt32 list_size)
 Get available audio usb devices. More...
 
SceInt32 sceUsbAudioInGetDeviceInformation (SceUInt32 device_id, SceUsbAudioInDeviceInfo *info)
 Get usb audio device info. More...
 
SceInt32 sceUsbAudioInGetMaxValueOfVolume (SceUInt32 device_id, SceUInt32 *volume)
 Get usb audio device max volume. More...
 
SceInt32 sceUsbAudioInGetMinValueOfVolume (SceUInt32 device_id, SceUInt32 *volume)
 Get usb audio device min volume. More...
 
SceInt32 sceUsbAudioInSetCurrentValueOfVolume (SceUInt32 device_id, SceUInt32 volume)
 Set usb audio device volume. More...
 
SceInt32 sceUsbAudioInInput (SceUInt32 device_id, void *buffer)
 Receive sound data from usb device. More...
 

Data Structure Documentation

◆ SceUsbAudioInDeviceInfo

struct SceUsbAudioInDeviceInfo
Data Fields
uint16_t vendor
uint16_t product
SceUInt32 _reserved[5]

◆ SceUsbAudioInDeviceListItem

struct SceUsbAudioInDeviceListItem
Data Fields
SceUInt32 device_id

Enumeration Type Documentation

◆ 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 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/2]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceUsbAudioInDeviceInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/2]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbAudioInDeviceListItem   
)

◆ sceUsbAudioInOpenDevice()

SceInt32 sceUsbAudioInOpenDevice ( SceUInt32  device_id,
int  bits,
int  rate 
)

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()

SceInt32 sceUsbAudioInCloseDevice ( SceUInt32  device_id)

Close usb audio device.

Returns
0 on success, < 0 on error
Parameters
[in]device_id- Device id

◆ sceUsbAudioInGetDeviceIdList()

SceInt32 sceUsbAudioInGetDeviceIdList ( SceUsbAudioInDeviceListItem list,
SceUInt32 device_count,
SceUInt32  list_size 
)

Get available audio usb devices.

Returns
0 on success, < 0 on error
Parameters
[out]list- pointer to array of SceUsbAudioInDeviceListItem
[out]device_count- connected device count
[in]list_size- number of items in SceUsbAudioInDeviceListItem array
Note
While function accepts up to 127 as list_size it can only return maximum 7 devices

◆ sceUsbAudioInGetDeviceInformation()

SceInt32 sceUsbAudioInGetDeviceInformation ( SceUInt32  device_id,
SceUsbAudioInDeviceInfo info 
)

Get usb audio device info.

Returns
0 on success, < 0 on error
Parameters
[in]device_id- Device id
[out]info- pointer to SceUsbAudioInDeviceInfo

◆ sceUsbAudioInGetMaxValueOfVolume()

SceInt32 sceUsbAudioInGetMaxValueOfVolume ( SceUInt32  device_id,
SceUInt32 volume 
)

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()

SceInt32 sceUsbAudioInGetMinValueOfVolume ( SceUInt32  device_id,
SceUInt32 volume 
)

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()

SceInt32 sceUsbAudioInSetCurrentValueOfVolume ( SceUInt32  device_id,
SceUInt32  volume 
)

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()

SceInt32 sceUsbAudioInInput ( SceUInt32  device_id,
void *  buffer 
)

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)