soundlib
Version 0.1
|
About | ||||||||||||||||||||||||||
Using | ||||||||||||||||||||||||||
IMPORTANT Things To Know | ||||||||||||||||||||||||||
General Sound Tips | ||||||||||||||||||||||||||
Limitations | ||||||||||||||||||||||||||
Sample
Programs
|
||||||||||||||||||||||||||
Release History |
This library provides
a set of functions that allow for mixing and output of sound on the Playstation
2 Linux platform. Among the features provided by this library are:
|
|
|
|
|
|
|
int
soundlib_initialize( int max_sounds, void* (*buffer_malloc)(int num_bytes, void* user_data), void (*buffer_free)(void* bytes, void* user_data), void* malloc_user_data); |
||||||||||||||||||||||||||
Parameters
Return Values
Remarks
See Also
|
void soundlib_shutdown(void); | ||||||||
Remarks
See Also
|
void soundlib_update(void); | |||||
Remarks
|
int soundlib_get_block_size(void); | |||||||||||
Return Values
Remarks
See Also
|
int soundlib_get_num_outputs(void); | |||||||||||
Return Values
Remarks
See Also
|
float soundlib_get_output_volume_step_size(void); | |||||||||||
Return Values
Remarks
See Also
|
void
soundlib_set_output_volume( int device, float volume); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_output_callback( int device, int callback, void (*callback_function)(int callback_id, char* buffer, int num_bytes, void* user_data), void* user_data); |
|||||||||||||||||||||||
Parameters
Remarks
|
int
soundlib_create_sound_from_file( const char* file, int is_streaming, int force_into_memory); |
|||||||||||||||||||||||||||||||||||
Parameters
Return Values
Remarks
See Also
|
int
soundlib_create_sound_from_memory( const void* memory, int num_bytes, int is_streaming); |
|||||||||||||||||||||||||||||
Parameters
Return Values
Remarks
See Also
|
int
soundlib_create_sound_from_callback( int (*callback)(int message, void* ptr, int data, void* user_data), void* user_data, int num_channels); |
|||||||||||||||||||||||
Parameters
Return Values
Remarks
See Also
|
int
soundlib_create_sound_instance( int sound); |
|||||||||||||||||||||||||||||
Parameters
Return Values
Remarks
See Also
|
void
soundlib_destroy_sound( int sound); |
||||||||||||||
Parameters
Remarks
See Also
|
void soundlib_destroy_all_sounds(void); | ||||||||
Remarks
See Also
|
void
soundlib_play_sound( int sound, int device, int is_looping, int play_offset); |
||||||||||||||||||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_stop_sound( int sound); |
||||||||||||||
Parameters
Remarks
See Also
|
float soundlib_get_sound_volume_step_size(void); | |||||||||||
Return Values
Remarks
See Also
|
void
soundlib_set_sound_volume( int sound, float volume); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_sound_volumes( int sound, float left_volume, float right_volume); |
||||||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_sound_left_volume( int sound, float volume); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_sound_right_volume( int sound, float volume); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_sound_frequency( int sound, int samples_per_sec); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_restore_sound_frequency( int sound); |
||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_enable_3d_sound( int sound, int enable); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_3d_sound_position( int sound, const float* pos); |
|||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_3d_sound_min_max_volume( int sound, float min_volume, float max_volume); |
||||||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_3d_sound_min_max_distance( int sound, float min_distance, float max_distance); |
||||||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_sound_callback( int sound, int callback, int (*callback_function)(int sound, int callback_id, char* buffer, int num_bytes, void* user_data), void* user_data); |
||||||||||||||||||||||||||
Parameters
Remarks
|
void
soundlib_set_listener( const float* pos, const float* up, const float* forward); |
||||||||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_listener_position( const float* pos); |
||||||||||||||
Parameters
Remarks
See Also
|
void
soundlib_set_listener_orientation( const float* up, const float* forward); |
|||||||||||||||||
Parameters
Remarks
See Also
|
int
soundlib_open_sound_buffer_from_file( soundlib_sound_buffer_t* buffer, const char* file); |
||||||||||||||||||||
Parameters
Return Value
Remarks
See Also
|
int
soundlib_open_sound_buffer_from_memory( soundlib_sound_buffer_t* buffer, const void* memory, int num_bytes); |
|||||||||||||||||||||||
Parameters
Return Value
Remarks
See Also
|
void
soundlib_close_sound_buffer_file( soundlib_sound_buffer_t* buffer); |
||||||||||||||
Parameters
Remarks
See Also
|
int
soundlib_load_sound_buffer( soundlib_sound_buffer_t* buffer); |
|||||||||||||||||
Parameters
Return Value
Remarks
See Also
|
int
soundlib_get_sound_buffer_bytes( soundlib_sound_buffer_t* buffer, int offset, int num_bytes, void** bytes, void** bytes2); |
|||||||||||||||||||||||||||||
Parameters
Return Value
Remarks
See Also
|
void
soundlib_mix_buffers( void* out, const void* a, const void* b, int num_bytes); |
||||||||||||||||||||
Parameters
Remarks
|
typedef
struct { char* data; int num_bytes; int num_channels; int samples_per_sec; int bits_per_sample; }soundlib_sound_buffer_t; |
||||||||||||||||||||||||||
Members
Remarks
See Also
|