NUGU SDK Linux  1.7.6
nugu_pcm.h File Reference
#include <stddef.h>
#include <nugu.h>
#include <base/nugu_audio.h>
#include <base/nugu_media.h>
+ Include dependency graph for nugu_pcm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nugu_pcm_driver_ops
 pcm driver operations More...
 

Typedefs

typedef struct _nugu_pcm NuguPcm
 pcm object
 
typedef struct _nugu_pcm_driver NuguPcmDriver
 pcm driver object
 

Functions

NUGU_API int nugu_pcm_add (NuguPcm *pcm)
 Add pcm object to managed list. More...
 
NUGU_API void nugu_pcm_clear_buffer (NuguPcm *pcm)
 Clear pcm buffer. More...
 
NUGU_API NuguPcmDrivernugu_pcm_driver_find (const char *name)
 Find a driver by name in the driver list. More...
 
NUGU_API int nugu_pcm_driver_free (NuguPcmDriver *driver)
 Destroy the pcm driver object. More...
 
NUGU_API NuguPcmDrivernugu_pcm_driver_get_default (void)
 Get the default pcm driver. More...
 
NUGU_API NuguPcmDrivernugu_pcm_driver_new (const char *name, struct nugu_pcm_driver_ops *ops)
 Create new pcm driver object. More...
 
NUGU_API int nugu_pcm_driver_register (NuguPcmDriver *driver)
 Register the driver to driver list. More...
 
NUGU_API int nugu_pcm_driver_remove (NuguPcmDriver *driver)
 Remove the driver from driver list. More...
 
NUGU_API int nugu_pcm_driver_set_default (NuguPcmDriver *driver)
 Set the default pcm driver. More...
 
NUGU_API void nugu_pcm_emit_event (NuguPcm *pcm, enum nugu_media_event event)
 Emit event to registered callback. More...
 
NUGU_API void nugu_pcm_emit_status (NuguPcm *pcm, enum nugu_media_status status)
 Emit status to registered callback. More...
 
NUGU_API NuguPcmnugu_pcm_find (const char *name)
 Find a pcm object by name in the managed list. More...
 
NUGU_API void nugu_pcm_free (NuguPcm *pcm)
 Destroy the pcm object. More...
 
NUGU_API int nugu_pcm_get_audio_attribute (NuguPcm *pcm)
 Get audio attribute. More...
 
NUGU_API const char * nugu_pcm_get_audio_attribute_str (NuguPcm *pcm)
 Get audio attribute. More...
 
NUGU_API int nugu_pcm_get_data (NuguPcm *pcm, char *data, size_t size)
 Get all data. More...
 
NUGU_API size_t nugu_pcm_get_data_size (NuguPcm *pcm)
 Get pcm data size. More...
 
NUGU_API void * nugu_pcm_get_driver_data (NuguPcm *pcm)
 Get custom data for driver. More...
 
NUGU_API int nugu_pcm_get_duration (NuguPcm *pcm)
 Get duration information of pcm. More...
 
NUGU_API int nugu_pcm_get_position (NuguPcm *pcm)
 Get current playback position of pcm. More...
 
NUGU_API enum nugu_media_status nugu_pcm_get_status (NuguPcm *pcm)
 Get status of pcm. More...
 
NUGU_API int nugu_pcm_get_volume (NuguPcm *pcm)
 Get volume of pcm. More...
 
NUGU_API NuguPcmnugu_pcm_new (const char *name, NuguPcmDriver *driver, NuguAudioProperty property)
 Create new pcm object. More...
 
NUGU_API int nugu_pcm_pause (NuguPcm *pcm)
 Pause pcm playback. More...
 
NUGU_API int nugu_pcm_push_data (NuguPcm *pcm, const char *data, size_t size, int is_last)
 Push playback pcm data. More...
 
NUGU_API int nugu_pcm_push_data_done (NuguPcm *pcm)
 Set flag that push for all data is complete. More...
 
NUGU_API int nugu_pcm_receive_is_last_data (NuguPcm *pcm)
 Get flag that all data pushes are complete. More...
 
NUGU_API int nugu_pcm_remove (NuguPcm *pcm)
 Remove pcm object from managed list. More...
 
NUGU_API int nugu_pcm_resume (NuguPcm *pcm)
 Resume pcm playback. More...
 
NUGU_API int nugu_pcm_set_audio_attribute (NuguPcm *pcm, NuguAudioAttribute attr)
 Set audio attribute. More...
 
NUGU_API int nugu_pcm_set_driver_data (NuguPcm *pcm, void *data)
 Set custom data for driver. More...
 
NUGU_API void nugu_pcm_set_event_callback (NuguPcm *pcm, NuguMediaEventCallback cb, void *userdata)
 Set pcm event callback. More...
 
NUGU_API void nugu_pcm_set_status_callback (NuguPcm *pcm, NuguMediaStatusCallback cb, void *userdata)
 Set pcm status callback. More...
 
NUGU_API int nugu_pcm_set_volume (NuguPcm *pcm, int volume)
 Set volume of pcm. More...
 
NUGU_API int nugu_pcm_start (NuguPcm *pcm)
 Start pcm playback. More...
 
NUGU_API int nugu_pcm_stop (NuguPcm *pcm)
 Stop pcm playback. More...