mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 04:45:42 +01:00
Fixed wave file saving by James Tappin
This commit is contained in:
parent
cc3f05a4f1
commit
bd6e546b5f
1 changed files with 3 additions and 4 deletions
|
@ -1465,14 +1465,13 @@ static void begin_wave(int fd, size_t cnt)
|
||||||
#if 0
|
#if 0
|
||||||
tmp2 = (samplesize == 8) ? 1 : 2;
|
tmp2 = (samplesize == 8) ? 1 : 2;
|
||||||
f.byte_p_spl = LE_SHORT(tmp2);
|
f.byte_p_spl = LE_SHORT(tmp2);
|
||||||
tmp2 = dsp_speed * hwparams.channels * tmp2;
|
tmp = dsp_speed * hwparams.channels * (u_int) tmp2;
|
||||||
f.byte_p_sec = LE_SHORT(tmp2);
|
|
||||||
#else
|
#else
|
||||||
tmp2 = hwparams.channels * ((bits + 7) / 8);
|
tmp2 = hwparams.channels * ((bits + 7) / 8);
|
||||||
f.byte_p_spl = LE_SHORT(tmp2);
|
f.byte_p_spl = LE_SHORT(tmp2);
|
||||||
tmp2 = tmp2 * hwparams.rate;
|
tmp = (u_int) tmp2 * hwparams.rate;
|
||||||
f.byte_p_sec = LE_SHORT(tmp2);
|
|
||||||
#endif
|
#endif
|
||||||
|
f.byte_p_sec = LE_INT(tmp);
|
||||||
f.bit_p_spl = LE_SHORT(bits);
|
f.bit_p_spl = LE_SHORT(bits);
|
||||||
|
|
||||||
cd.type = WAV_DATA;
|
cd.type = WAV_DATA;
|
||||||
|
|
Loading…
Reference in a new issue