mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 04:27:12 +03:00
vorbis
This commit is contained in:
@@ -381,12 +381,16 @@ void output_init_common(log_level level, const char *device, unsigned output_buf
|
|||||||
output.idle_to = (u32_t) idle;
|
output.idle_to = (u32_t) idle;
|
||||||
|
|
||||||
/* Skip test_open for stdout, set default sample rates */
|
/* Skip test_open for stdout, set default sample rates */
|
||||||
|
#if !EMBEDDED
|
||||||
if ( output.device[0] == '-' ) {
|
if ( output.device[0] == '-' ) {
|
||||||
for (i = 0; i < MAX_SUPPORTED_SAMPLERATES; ++i) {
|
for (i = 0; i < MAX_SUPPORTED_SAMPLERATES; ++i) {
|
||||||
output.supported_rates[i] = rates[i];
|
output.supported_rates[i] = rates[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
#endif
|
||||||
if (!test_open(output.device, output.supported_rates, user_rates)) {
|
if (!test_open(output.device, output.supported_rates, user_rates)) {
|
||||||
LOG_ERROR("unable to open output device: %s", output.device);
|
LOG_ERROR("unable to open output device: %s", output.device);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ static decode_state vorbis_decode(void) {
|
|||||||
count = frames * channels;
|
count = frames * channels;
|
||||||
|
|
||||||
iptr = (s16_t *)write_buf + count;
|
iptr = (s16_t *)write_buf + count;
|
||||||
optr = (ISAMPLE_T *)write_buf + frames * 2;
|
optr = (ISAMPLE_T *) outputbuf->writep + frames * 2;
|
||||||
|
|
||||||
if (channels == 2) {
|
if (channels == 2) {
|
||||||
#if BYTES_PER_FRAME == 4
|
#if BYTES_PER_FRAME == 4
|
||||||
|
|||||||
Reference in New Issue
Block a user