Thread: libcanberra
View Single Post
Posts: 2 | Thanked: 2 times | Joined on Jun 2010 @ Finland
#1
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