Commit 91ad576a authored by Max Kellermann's avatar Max Kellermann

jack: added constant "frame_size"

Don't hard-code a frame size of "4" (16 bit stereo), calculate the sample size from sizeof(*buffer), and create the constant "frame_size".
parent 9d6651d8
......@@ -389,8 +389,9 @@ static int jack_playAudio(void *data,
size_t space;
size_t i;
const short *buffer = (const short *) buff;
static const size_t frame_size = sizeof(*buffer) * 2;
jack_default_audio_sample_t sample;
size_t samples = size/4;
size_t samples = size / frame_size;
/*DEBUG("jack_playAudio: (pid=%d)!\n", getpid());*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment