mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-01-07 22:50:14 +01:00
pacat: Make writes be frame-aligned, even for raw mode
This will be aligned to the fake sample spec corresponding to the format, but that is correct and will prevent breakage in libpulse and the server where we have aligned-ness expectations.
This commit is contained in:
parent
48c57ba4c5
commit
bfb5e03e83
1 changed files with 4 additions and 1 deletions
|
|
@ -1060,6 +1060,9 @@ int main(int argc, char *argv[]) {
|
|||
pa_format_info_set_rate(formats[0], sample_spec.rate);
|
||||
pa_format_info_set_channels(formats[0], sample_spec.channels);
|
||||
|
||||
/* Fix up the sample spec based on the format we have */
|
||||
pa_format_info_to_sample_spec(formats[0], &sample_spec, NULL);
|
||||
|
||||
if (!pa_format_info_valid(formats[0])) {
|
||||
pa_log(_("Invalid format specification."));
|
||||
goto quit;
|
||||
|
|
@ -1229,7 +1232,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
if (raw && !encoding_set && mode == PLAYBACK)
|
||||
if (raw && mode == PLAYBACK)
|
||||
partialframe_buf = pa_xmalloc(pa_frame_size(&sample_spec));
|
||||
|
||||
/* Set up a new main loop */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue