vitasdk
Documentation of the vitasdk
voice.h File Reference
#include <psp2/types.h>

Go to the source code of this file.

Data Structures

struct  SceVoiceEventPortDataReady
 
struct  SceVoiceEventAudioInputOwnershipChanged
 
struct  SceVoiceEvent
 
struct  SceVoiceInitParam
 
struct  SceVoiceStartParam
 
struct  SceVoicePortParam
 
struct  SceVoiceResourceInfo
 
struct  SceVoicePortInfo
 
union  SceVoiceEvent.event_payload
 
union  SceVoicePortParam.data
 

Macros

#define SCE_VOICE_VERSION   100
 
#define SCE_VOICE_WORKING_MEMORY_SIZE   0x40000
 
#define SCE_VOICE_MAX_EVENT_PORTS   7
 

Typedefs

typedef SceUInt32 SceVoicePortId
 
typedef void(* SceVoiceEventCallback) (const SceVoiceEvent *event)
 Voice event callback.
 

Enumerations

enum  SceVoiceErrorCode {
  SCE_VOICE_ERROR_NOT_INITIALIZED = 0x804E0801 , SCE_VOICE_ERROR_ALREADY_INITIALIZED = 0x804E0802 , SCE_VOICE_ERROR_INTERNAL = 0x804E0803 , SCE_VOICE_ERROR_INVALID_PORT_ID = 0x804E0804 ,
  SCE_VOICE_ERROR_INVALID_ARGUMENT = 0x804E0805 , SCE_VOICE_ERROR_INVALID_MEMBLOCK = 0x804E0806 , SCE_VOICE_ERROR_INVALID_PORT = 0x804E0807 , SCE_VOICE_ERROR_RESOURCE_LIMIT = 0x804E0808 ,
  SCE_VOICE_ERROR_NOT_STARTED = 0x804E080A
}
 
enum  SceVoiceApplicationType { SCE_VOICE_APPLICATION_TYPE_UNK_0x20000000 = 0x20000000 , SCE_VOICE_APPLICATION_TYPE_UNK_0x80000000 = 0x80000000 }
 Voice application profiles accepted by sceVoiceInit. More...
 
enum  SceVoicePortType {
  SCE_VOICE_PORT_TYPE_IN_DEVICE = 0 , SCE_VOICE_PORT_TYPE_IN_PCMAUDIO = 1 , SCE_VOICE_PORT_TYPE_IN_VOICE = 2 , SCE_VOICE_PORT_TYPE_OUT_PCMAUDIO = 3 ,
  SCE_VOICE_PORT_TYPE_OUT_VOICE = 4 , SCE_VOICE_PORT_TYPE_OUT_DEVICE = 5
}
 
enum  SceVoicePortState { SCE_VOICE_PORT_STATE_INACTIVE = 0 , SCE_VOICE_PORT_STATE_IDLE = 1 , SCE_VOICE_PORT_STATE_BUFFERING = 2 , SCE_VOICE_PORT_STATE_ACTIVE = 3 }
 Port processing states reported by sceVoiceGetPortInfo on FW 3.60. More...
 
enum  SceVoiceBitRate {
  SCE_VOICE_BIT_RATE_3850 = 3850 , SCE_VOICE_BIT_RATE_4650 = 4650 , SCE_VOICE_BIT_RATE_5700 = 5700 , SCE_VOICE_BIT_RATE_7300 = 7300 ,
  SCE_VOICE_BIT_RATE_12200 = 12200
}
 8 kHz CELP bitrates supported by the FW 3.60 Voice codec. More...
 
enum  SceVoicePcmDataType { SCE_VOICE_PCM_DATA_TYPE_S16LE = 0 }
 
enum  SceVoiceSamplingRate { SCE_VOICE_SAMPLING_RATE_16000 = 16000 }
 
enum  SceVoicePortAttr { SCE_VOICE_PORT_ATTR_AUDIO_INPUT_OWNERSHIP = 1000 }
 
enum  SceVoiceEventType { SCE_VOICE_EVENT_TYPE_PORT_DATA_READY = 1 , SCE_VOICE_EVENT_TYPE_AUDIO_INPUT_OWNERSHIP_CHANGED = 2 }
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x10, SceVoiceEventPortDataReady)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceVoiceEventAudioInputOwnershipChanged)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceVoiceEvent)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceVoiceInitParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceVoiceStartParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceVoicePortParam)
 
 VITASDK_BUILD_ASSERT_EQ (0xA, SceVoiceResourceInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceVoicePortInfo)
 
int sceVoiceInit (const SceVoiceInitParam *param, SceUInt32 version)
 Initialize Voice for the calling process.
 
int sceVoiceEnd (void)
 Shut down Voice for the calling process and release its ports.
 
int sceVoiceStart (const SceVoiceStartParam *param)
 Attach the Voice instance to its working-memory block and start processing.
 
int sceVoiceStop (void)
 Stop Voice processing and detach the working-memory block.
 
int sceVoiceGetResourceInfo (SceVoiceResourceInfo *info)
 Get the port limits assigned to this Voice instance.
 
int sceVoiceCheckTopology (void)
 Check whether the current port connections are valid.
 
int sceVoiceSetMuteFlagAll (SceBool mute)
 Set the process-wide mute-reporting override.
 
int sceVoiceSetMuteFlag (SceVoicePortId port_id, SceBool mute)
 Set one port's mute flag.
 
int sceVoiceGetMuteFlag (SceVoicePortId port_id, SceUInt16 *mute)
 Get one port's reported mute flag.
 
int sceVoiceSetVolume (SceVoicePortId port_id, float volume)
 Set one port's linear volume.
 
int sceVoiceGetVolume (SceVoicePortId port_id, float *volume)
 Get one port's linear volume.
 
int sceVoiceSetBitRate (SceVoicePortId port_id, SceUInt32 bit_rate)
 Change the bitrate of an encoded input or output port.
 
int sceVoiceGetBitRate (SceVoicePortId port_id, SceUInt32 *bit_rate)
 Get the bitrate of an encoded input or output port.
 
int sceVoiceSetPortAttr (SceVoicePortId port_id, SceVoicePortAttr attr, const SceInt32 *value)
 Set a port attribute.
 
int sceVoiceGetPortAttr (SceVoicePortId port_id, SceVoicePortAttr attr, SceInt32 *value)
 Get a port attribute.
 
int sceVoiceCreatePort (SceVoicePortId *port_id, const SceVoicePortParam *param)
 Create a Voice port.
 
int sceVoiceUpdatePort (SceVoicePortId port_id, const SceVoicePortParam *param)
 Update an existing port's configuration.
 
int sceVoiceConnectIPortToOPort (SceVoicePortId input_port_id, SceVoicePortId output_port_id)
 Connect an input port to an output port.
 
int sceVoiceDisconnectIPortFromOPort (SceVoicePortId input_port_id, SceVoicePortId output_port_id)
 Disconnect an input port from an output port.
 
int sceVoiceDeletePort (SceVoicePortId port_id)
 Delete a Voice port and remove its connections.
 
int sceVoiceWriteToIPort (SceVoicePortId port_id, const void *data, SceSize *size, SceInt16 frame_gap)
 Write application data to a PCM or encoded input port.
 
int sceVoiceReadFromOPort (SceVoicePortId port_id, void *data, SceSize *size)
 Read application data from a PCM or encoded output port.
 
int sceVoiceGetPortInfo (SceVoicePortId port_id, SceVoicePortInfo *info)
 Get one port's type, processing state, available data, and frame size.
 
int sceVoiceResetPort (SceVoicePortId port_id)
 Clear one port's buffered data and reset its processing state.
 
int sceVoicePausePort (SceVoicePortId port_id)
 Pause processing for one port.
 
int sceVoiceResumePort (SceVoicePortId port_id)
 Resume processing for one port.
 
int sceVoicePausePortAll (void)
 Pause processing for every Voice port in the calling process.
 
int sceVoiceResumePortAll (void)
 Resume processing for every Voice port in the calling process.