#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <alp/types.h>
#include <alp/sysclass.h>
#include <alp/traces.h>
Go to the source code of this file.
Data Structures | |
| struct | _AlpSndNotifyActionChangeStru |
| AlpSndNotifyActionChangeStru Struct. More... | |
| struct | _AlpSndNotifyDeviceChangeStru |
| AlpSndNotifyDeviceChangeStru Struct. More... | |
| struct | _AlpSndNotifyPathChangeStru |
| AlpSndNotifyPathChangeStru Struct. More... | |
| struct | _AlpSndNotifyStru |
| AlpSndNotifyStru Struct. More... | |
| struct | _AlpSndPcmFmt |
| AlpSndPcmFmt Struct. More... | |
| struct | _stream_status_t |
| stream_status_t Struct More... | |
Defines | |
| #define | ALP_NOTIFY_EVENT_AUDIO_ACTION_CHANGE "/alp/audio_action/change" |
| sound stream action change notification id, related structure AlpSndNotifyActionChangeStru. | |
| #define | ALP_NOTIFY_EVENT_AUDIO_DEVICE_CHANGE "/alp/audio_device/change" |
| audio device status change notification id, related structure AlpSndNotifyDeviceChangeStru. | |
| #define | ALP_NOTIFY_EVENT_AUDIO_ROUTE_CHANGE "/alp/audio_route/change" |
| sound route path change notification id, related structure AlpSndNotifyPathChangeStru. | |
| #define | ALP_SND_ATTENTION ALP_SND_STOCK_SOUND_PREFIX "attention" |
| Attention sound. | |
| #define | ALP_SND_CAMERA_SHUTTER ALP_SND_STOCK_SOUND_PREFIX "camera-shutter" |
| Sound of camera taking a picture. | |
| #define | ALP_SND_CAMERA_ZOOM ALP_SND_STOCK_SOUND_PREFIX "camera-zoom" |
| Sound of camera zomming in or out. | |
| #define | ALP_SND_DELETED ALP_SND_STOCK_SOUND_PREFIX "deleted" |
| UI confirmation, when data has been deleted. | |
| #define | ALP_SND_DEVICE_OFF 0 |
| Sound device is closed. | |
| #define | ALP_SND_DEVICE_ON 1 |
| Sound device is opened. | |
| #define | ALP_SND_ERROR ALP_SND_STOCK_SOUND_PREFIX "error" |
| Sound of an error, possibly caused by the user. | |
| #define | ALP_SND_KEY ALP_SND_STOCK_SOUND_PREFIX "soft-keyboard" |
| The sound that is produced when a key on the software keyboard is pressed. | |
| #define | ALP_SND_SAVED ALP_SND_STOCK_SOUND_PREFIX "saved" |
| UI confirmation, when data has been saved. | |
| #define | ALP_SND_STOCK_SOUND_PREFIX "stock:sound/" |
| Prefix of system sound key. | |
| #define | ALP_SND_THEME_BASE_SETTINGS_PATH "/alp/themes/sounds/PCM/" |
| Base path for the settings for the Audio Manager API. | |
| #define | ALP_SND_WARNING ALP_SND_STOCK_SOUND_PREFIX "warning" |
| Sound of danger, Something bad could happen. | |
| #define | ALP_STATUS_SND_CALLBACK_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x000e0000) |
| Register/create callback function failed. | |
| #define | ALP_STATUS_SND_CONNECT_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00090000) |
| Connect to audio manager failed. | |
| #define | ALP_STATUS_SND_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00020000) |
| API failed with unknown reason. | |
| #define | ALP_STATUS_SND_ERROR_NO_SOUND (ALP_CLASS_AUDIO_MANAGER | 0x00030000) |
| No system sound file. | |
| #define | ALP_STATUS_SND_FORMAT_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00060000) |
| Audio format is illegal or set format failed. | |
| #define | ALP_STATUS_SND_MALLOC_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00080000) |
| Malloc memory failed. | |
| #define | ALP_STATUS_SND_NO_FILE_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00040000) |
| No find music file. | |
| #define | ALP_STATUS_SND_NOTIFY_KEY_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x000d0000) |
| Notify key name is illegal. | |
| #define | ALP_STATUS_SND_OK ALP_STATUS_OK |
| API succeeded. | |
| #define | ALP_STATUS_SND_OPEN_FILE_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00050000) |
| Open music file failed. | |
| #define | ALP_STATUS_SND_PARAM_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x000b0000) |
| API parameter is illegal. | |
| #define | ALP_STATUS_SND_PAUSED_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00100000) |
| Audio stream write error in paused state. | |
| #define | ALP_STATUS_SND_SAVE_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00110000) |
| save to global setting failed. | |
| #define | ALP_STATUS_SND_SEND_MSG_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x000c0000) |
| Send msg to audio manager failed. | |
| #define | ALP_STATUS_SND_STATE_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x000f0000) |
| Audio stream state is illegal or stream is in unproper state. | |
| #define | ALP_STATUS_SND_STREAM_TYPE_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x000a0000) |
| Audio stream type is illegal. | |
| #define | ALP_STATUS_SND_SYSTEM_ERROR (ALP_CLASS_AUDIO_MANAGER | 0x00070000) |
| Create/Access share memory or semaphore failed. | |
| #define | AUDIOMGR_SINK_DEBUG(fmt,) ALP_TM(T(AudioSSTraceClass, "AUDIOMGRSINK_DEBUG: " fmt, ## __VA_ARGS__)) |
| #define | AUDIOMGR_SINK_ERROR(args...) |
| #define | AUDIOMGR_SRC_DEBUG(fmt,) ALP_TM(T(AudioSSTraceClass, "AUDIOMGRSRC_DEBUG: " fmt, ## __VA_ARGS__)) |
| #define | AUDIOMGR_SRC_ERROR(args...) |
| #define | AudioSSTraceClass ALP_TRACE_DEFINE(ALP_CLASS_AUDIO_MANAGER, 0) |
| #define | MAX_NAME_LEN 32 |
| MAX_NAME_LEN. | |
Typedefs | |
| typedef void(* | AlpSndCallBack )(void *handle, void *data, AlpSndMsgType msgtype, void *msginfo) |
| Called when audio manager events occur. | |
| typedef _AlpSndNotifyActionChangeStru | AlpSndNotifyActionChangeStru |
| AlpSndNotifyActionChangeStru Struct. | |
| typedef _AlpSndNotifyDeviceChangeStru | AlpSndNotifyDeviceChangeStru |
| AlpSndNotifyDeviceChangeStru Struct. | |
| typedef _AlpSndNotifyPathChangeStru | AlpSndNotifyPathChangeStru |
| AlpSndNotifyPathChangeStru Struct. | |
| typedef _AlpSndNotifyStru | AlpSndNotifyStru |
| AlpSndNotifyStru Struct. | |
| typedef _AlpSndPcmFmt | AlpSndPcmFmt |
| AlpSndPcmFmt Struct. | |
| typedef _stream_status_t | stream_status_t |
| stream_status_t Struct | |
Enumerations | |
| enum | AlpSndActionType { ALP_SND_ACTION_NULL = 0, ALP_SND_ACTION_PLAY, ALP_SND_ACTION_ATTENUATE, ALP_SND_ACTION_PAUSE, ALP_SND_ACTION_MUTE, ALP_SND_ACTION_STOP, ALP_SND_ACTION_RECORD } |
| AlpSndActionType Enum. More... | |
| enum | AlpSndAppMode { ALP_SND_MODE_PLAYBACK, ALP_SND_MODE_RECORD } |
| AlpSndAppMode Enum. More... | |
| enum | AlpSndCmd { ALP_SND_CTL_PLAY, ALP_SND_CTL_APLAY, ALP_SND_CTL_STOP, ALP_SND_CTL_PAUSE, ALP_SND_CTL_RECORD, ALP_SND_SET_VOLUME, ALP_SND_GET_VOLUME, ALP_SND_SET_FORMAT, ALP_SND_GET_FORMAT, ALP_SND_GET_DELAY, ALP_SND_SET_SRCTYPE, ALP_SND_SET_DRMFLAG, ALP_SND_CTL_DRAIN, ALP_SND_CTL_FLUSH_START, ALP_SND_CTL_FLUSH_STOP } |
| AlpSndCmd Enum. More... | |
| enum | AlpSndMsgType { ALP_SND_MSG_ACTION_CHANGED } |
| AlpSndMsgType Enum. More... | |
| enum | AlpSndNotifyType { ALP_SND_NOTIFY_VOLUME, ALP_SND_NOTIFY_CONDITION, ALP_SND_NOTIFY_DEVPRESENT, ALP_SND_NOTIFY_VOLUME_TEMP } |
| AlpSndNotifyType Enum. More... | |
Functions | |
| alp_status_t | alp_snd_callback_register (void *handle, void *data, AlpSndCallBack cb) |
| Register a callback function to process message from audio manager. | |
| alp_status_t | alp_snd_close (void *handle) |
| Close ALP sound handle object. | |
| alp_status_t | alp_snd_dev_get_present (char *name, uint8_t *status) |
| This funtion is used to check whether a sound device is present or not. | |
| alp_status_t | alp_snd_get_current_routepath (char *streamtype, char **routepath) |
| Get the current route path(device name) of the specified stream type. | |
| alp_status_t | alp_snd_get_silent_mode (bool *silent_mode) |
| Get mute status . | |
| alp_status_t | alp_snd_get_stream_status (char *stream_type, int *num_app, stream_status_t **arrary) |
| Get status of streams of type "stream_type". | |
| alp_status_t | alp_snd_get_stream_type_status (char *streamtype, bool *status) |
| Get active stream type status. | |
| alp_status_t | alp_snd_get_stream_volume (char *stream_type, int *volume) |
| Get stream type volume. | |
| alp_status_t | alp_snd_ioctl (void *handle, AlpSndCmd cmd, void *data) |
| I/O control function for both middleware components and application. | |
| alp_status_t | alp_snd_notify (AlpSndNotifyStru *notify, AlpSndNotifyType type, int num) |
| This function is used to send notification message to audio manager. | |
| alp_status_t | alp_snd_open (void **handle, char *srcid, AlpSndAppMode mode) |
| Opens an audio handle object for playback or recording. | |
| alp_status_t | alp_snd_play_tone (unsigned short amplitude, unsigned short duration, unsigned short freq) |
| This function is used to play tone. | |
| alp_status_t | alp_snd_read (void *handle, void *pbuf, int buflen, int *preadlen) |
| Read audio PCM data(from audio manager) into a buffer which is malloced from an open audio handle. | |
| alp_status_t | alp_snd_syssnd_async_fini (int id) |
| This function is used to do finish work for asynchronous play. | |
| alp_status_t | alp_snd_syssnd_async_init (const char *sound, int *id) |
| This function is used to do initial work for async play. | |
| alp_status_t | alp_snd_syssnd_async_play (int id, char *streamtype, int volume) |
| This function is used to asynchronous play system sound(uncompressed wav file). | |
| alp_status_t | alp_snd_syssnd_async_play_file (char *filename, char *streamtype, int volume) |
| This function is used to asychnronous play PCM(.wav) file. | |
| alp_status_t | alp_snd_syssnd_play (const char *sound, char *streamtype, int volume) |
| This function is used to play system sound(uncompressed wav file) file. | |
| alp_status_t | alp_snd_syssnd_play_file (char *filename, char *streamtype, int volume) |
| This function is used to play PCM(.wav) file. | |
| alp_status_t | alp_snd_write (void *handle, void *pbuf, int buflen) |
| Write audio PCM data to audio manager from the specified audio object. | |
|
|
|
|
|
Value: { \
g_print("AUDIOMGRSINK_ERROR: "); \
g_print(args); \
}
|
|
|
|
|
|
Value: { \
g_print("AUDIOMGRSRC_ERROR: "); \
g_print(args); \
}
|
|
|
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.