projects
/
profile
/
ivi
/
pulseaudio-panda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7779ec
)
Correct wav file creation for 24/32 and 24 bits sample formats HSD=3669357
author
Vincent Becker
<vincentx.becker@intel.com>
Tue, 8 Feb 2011 10:24:08 +0000
(11:24 +0100)
committer
Colin Guthrie
<cguthrie@mandriva.org>
Tue, 22 Feb 2011 09:55:58 +0000
(09:55 +0000)
src/pulsecore/sndfile-util.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/sndfile-util.c
b/src/pulsecore/sndfile-util.c
index
9d15a86
..
cadda93
100644
(file)
--- a/
src/pulsecore/sndfile-util.c
+++ b/
src/pulsecore/sndfile-util.c
@@
-51,6
+51,9
@@
int pa_sndfile_read_sample_spec(SNDFILE *sf, pa_sample_spec *ss) {
break;
case SF_FORMAT_PCM_24:
break;
case SF_FORMAT_PCM_24:
+ ss->format = PA_SAMPLE_S24NE;
+ break;
+
case SF_FORMAT_PCM_32:
ss->format = PA_SAMPLE_S32NE;
break;
case SF_FORMAT_PCM_32:
ss->format = PA_SAMPLE_S32NE;
break;
@@
-106,10
+109,14
@@
int pa_sndfile_write_sample_spec(SF_INFO *sfi, pa_sample_spec *ss) {
case PA_SAMPLE_S24LE:
case PA_SAMPLE_S24BE:
case PA_SAMPLE_S24LE:
case PA_SAMPLE_S24BE:
+ ss->format = PA_SAMPLE_S24NE;
+ sfi->format |= SF_FORMAT_PCM_24;
+ break;
+
case PA_SAMPLE_S24_32LE:
case PA_SAMPLE_S24_32BE:
case PA_SAMPLE_S24_32LE:
case PA_SAMPLE_S24_32BE:
- ss->format = PA_SAMPLE_S32NE;
- sfi->format |= SF_FORMAT_PCM_
24
;
+ ss->format = PA_SAMPLE_S
24_
32NE;
+ sfi->format |= SF_FORMAT_PCM_
32
;
break;
case PA_SAMPLE_S32LE:
break;
case PA_SAMPLE_S32LE:
@@
-362,6
+369,7
@@
pa_sndfile_readf_t pa_sndfile_readf_function(const pa_sample_spec *ss) {
return (pa_sndfile_readf_t) sf_readf_short;
case PA_SAMPLE_S32NE:
return (pa_sndfile_readf_t) sf_readf_short;
case PA_SAMPLE_S32NE:
+ case PA_SAMPLE_S24_32NE:
return (pa_sndfile_readf_t) sf_readf_int;
case PA_SAMPLE_FLOAT32NE:
return (pa_sndfile_readf_t) sf_readf_int;
case PA_SAMPLE_FLOAT32NE:
@@
-384,6
+392,7
@@
pa_sndfile_writef_t pa_sndfile_writef_function(const pa_sample_spec *ss) {
return (pa_sndfile_writef_t) sf_writef_short;
case PA_SAMPLE_S32NE:
return (pa_sndfile_writef_t) sf_writef_short;
case PA_SAMPLE_S32NE:
+ case PA_SAMPLE_S24_32NE:
return (pa_sndfile_writef_t) sf_writef_int;
case PA_SAMPLE_FLOAT32NE:
return (pa_sndfile_writef_t) sf_writef_int;
case PA_SAMPLE_FLOAT32NE: