From 8040f48974d88c6d30dff720a2ffb27e0cf54814 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 23 Sep 2018 16:13:37 +0200 Subject: Integrate channel map into file list in instrument editor. --- src/player.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/player.cc') diff --git a/src/player.cc b/src/player.cc index af3cd7c..d598d9f 100644 --- a/src/player.cc +++ b/src/player.cc @@ -67,7 +67,7 @@ void Player::run() ao_sample_format sf; memset(&sf, 0, sizeof(sf)); sf.bits = 16; - sf.rate = 44100; + sf.rate = pcm_samplerate; sf.channels = 1; sf.byte_format = AO_FMT_NATIVE; @@ -188,10 +188,11 @@ void Player::reportTimeout() peak = 0.0; } -void Player::setPcmData(float* data, size_t size) +void Player::setPcmData(float* data, size_t size, double samplerate) { pcm_data = data; pcm_size = size; + pcm_samplerate = samplerate; } void Player::setPosition(size_t position) -- cgit v1.2.3