From 1cd468f48d2728bf2dfc6fad7d19fc5ac9c6e359 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <komh78@gmail.com>
Date: Fri, 31 Jan 2025 21:40:27 +0900
Subject: [PATCH] Fix mis-calculation of orig_samplesize
orig_samplesize should be calculated from pcm->orig_format not
pcm->format.
---
lib/unipcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/unipcm.c b/lib/unipcm.c
index 8d0081f..fa71f53 100644
a
|
b
|
int _uniaud_pcm_write(uniaud_pcm *pcm, char* buffer, int size)
|
655 | 655 | } |
656 | 656 | } |
657 | 657 | #endif |
658 | | orig_samplesize = uniaud_pcm_format_size(pcm->format, 1) * pcm->orig_channels; |
| 658 | orig_samplesize = uniaud_pcm_format_size(pcm->orig_format, 1) * pcm->orig_channels; |
659 | 659 | samplesize = uniaud_pcm_format_size(pcm->format, 1) * pcm->channels; |
660 | 660 | if (pcm->resample_size == 0) { |
661 | 661 | //printf("format: %i, orig format: %i chans: %i, ssize: %i\n",pcm->format, pcm->orig_format, |