maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   libcanberra (https://talk.maemo.org/showthread.php?t=54882)

MaxaVadallat 2010-06-02 08:30

libcanberra
 
Hi,

Does anyone know how to play theme sounds (e.g. incoming IM) in N900 using canberra?

So far I'm able to play .wav files.

Code:

        // Create a context for the event sounds
        if (ca_context_create(&caContext) == CA_SUCCESS)
        {
            // Create Property List
            if (ca_proplist_create(&caPropList) == CA_SUCCESS)
            {
                // Set Properties
                ca_proplist_sets(caPropList, CA_PROP_APPLICATION_NAME, QN_APPLICATION_NAME);
                ca_proplist_sets(caPropList, CA_PROP_MEDIA_FILENAME, QN_VIEWER_AUDIO_FILE_PATH);
                ca_proplist_sets(caPropList, CA_PROP_MEDIA_ROLE, QN_VIEWER_AUDIIO_CONTEXT_ROLE);

                // Play Context
                ca_context_play_full(caContext, 0, caPropList, audioPlaybackDone, this);

                // Destroy Property List
                ca_proplist_destroy(caPropList);
                // reset Property List
                caPropList = NULL;
            }
        }

As I understood from caberra API, for that I need some maemo specific info to fill up property list.
http://0pointer.de/lennart/projects/...a-context-play

Can anyone help please?

Cheers,
Max


All times are GMT. The time now is 21:43.

vBulletin® Version 3.8.8