View | Details | Raw Unified | Return to bug 22885
Collapse All | Expand All

(-)a/widget/src/gtk2/nsSound.cpp (+6 lines)
Lines 88-93 typedef void (*EsdAudioCloseType) (void); Link Here
88
 */
88
 */
89
typedef struct _ca_context ca_context;
89
typedef struct _ca_context ca_context;
90
90
91
typedef int (*ca_context_set_driver_fn) (ca_context *, const char *);
91
typedef int (*ca_context_create_fn) (ca_context **);
92
typedef int (*ca_context_create_fn) (ca_context **);
92
typedef int (*ca_context_destroy_fn) (ca_context *);
93
typedef int (*ca_context_destroy_fn) (ca_context *);
93
typedef int (*ca_context_play_fn) (ca_context *c,
94
typedef int (*ca_context_play_fn) (ca_context *c,
Lines 96-101 typedef int (*ca_context_play_fn) (ca_context *c, Link Here
96
typedef int (*ca_context_change_props_fn) (ca_context *c,
97
typedef int (*ca_context_change_props_fn) (ca_context *c,
97
                                           ...);
98
                                           ...);
98
99
100
static ca_context_set_driver_fn ca_context_set_driver;
99
static ca_context_create_fn ca_context_create;
101
static ca_context_create_fn ca_context_create;
100
static ca_context_destroy_fn ca_context_destroy;
102
static ca_context_destroy_fn ca_context_destroy;
101
static ca_context_play_fn ca_context_play;
103
static ca_context_play_fn ca_context_play;
Lines 186-191 nsSound::Init() Link Here
186
                libcanberra = nsnull;
188
                libcanberra = nsnull;
187
            } else {
189
            } else {
188
                // at this point we know we have a good libcanberra library
190
                // at this point we know we have a good libcanberra library
191
                ca_context_set_driver = (ca_context_set_driver_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_set_driver");
189
                ca_context_destroy = (ca_context_destroy_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_destroy");
192
                ca_context_destroy = (ca_context_destroy_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_destroy");
190
                ca_context_play = (ca_context_play_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_play");
193
                ca_context_play = (ca_context_play_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_play");
191
                ca_context_change_props = (ca_context_change_props_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_change_props");
194
                ca_context_change_props = (ca_context_change_props_fn) PR_FindFunctionSymbol(libcanberra, "ca_context_change_props");
Lines 476-481 NS_IMETHODIMP nsSound::PlayEventSound(PRUint32 aEventId) Link Here
476
            return NS_ERROR_OUT_OF_MEMORY;
479
            return NS_ERROR_OUT_OF_MEMORY;
477
        }
480
        }
478
481
482
483
        ca_context_set_driver(ctx, "alsa");
484
479
        g_static_private_set(&ctx_static_private, ctx, (GDestroyNotify) ca_context_destroy);
485
        g_static_private_set(&ctx_static_private, ctx, (GDestroyNotify) ca_context_destroy);
480
    }
486
    }
481
487

Return to bug 22885