From b5196b51f6858347bc1af2e243cbc1cd742110ee Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Fri, 11 Dec 2009 21:40:13 +0100 Subject: alsa code converted into output plugin --- cgme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cgme.c') diff --git a/cgme.c b/cgme.c index 21aeb292..f4e805ce 100644 --- a/cgme.c +++ b/cgme.c @@ -32,7 +32,8 @@ static float duration; // of current song static int cgme_init (DB_playItem_t *it) { - if (gme_open_file (it->fname, &emu, deadbeef->playback_get_samplerate ())) { + int samplerate = deadbeef->get_output ()->samplerate (); + if (gme_open_file (it->fname, &emu, samplerate)) { return -1; } gme_mute_voices (emu, cgme_voicemask); @@ -41,7 +42,7 @@ cgme_init (DB_playItem_t *it) { gme_track_info (emu, &inf, it->tracknum); plugin.info.bps = 16; plugin.info.channels = 2; - plugin.info.samplerate = deadbeef->playback_get_samplerate (); + plugin.info.samplerate = samplerate; duration = deadbeef->pl_get_item_duration (it); reallength = inf.length; nzerosamples = 0; -- cgit v1.2.3