[retro-gtk] retro-pa-player: Fix resample loop condition
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] retro-pa-player: Fix resample loop condition
- Date: Thu, 30 Jan 2020 12:56:48 +0000 (UTC)
commit a4bdf0925bca0a2d94609f0b5096b14dee651060
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jan 30 17:48:13 2020 +0500
retro-pa-player: Fix resample loop condition
Libsamplerate operates with the number of frames, so we should divide
length by 2 when comparing.
retro-gtk/retro-pa-player.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/retro-gtk/retro-pa-player.c b/retro-gtk/retro-pa-player.c
index 2d9b510..4873fe0 100644
--- a/retro-gtk/retro-pa-player.c
+++ b/retro-gtk/retro-pa-player.c
@@ -109,7 +109,7 @@ resample (RetroPaPlayer *self,
frames_used_in = 0;
frames_used_out = 0;
- while (frames_used_in < length) {
+ while (frames_used_in < length / 2) {
SRC_DATA data;
data.data_in = data_in + frames_used_in * sizeof (gfloat);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]