philippe44 5 年之前
父节点
当前提交
985fccb18d
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 5 1
      components/squeezelite/output.c
  2. 1 1
      components/squeezelite/vorbis.c

+ 5 - 1
components/squeezelite/output.c

@@ -381,12 +381,16 @@ void output_init_common(log_level level, const char *device, unsigned output_buf
 	output.idle_to = (u32_t) idle;
 
 	/* Skip test_open for stdout, set default sample rates */
+#if !EMBEDDED
 	if ( output.device[0] == '-' ) {
 		for (i = 0; i < MAX_SUPPORTED_SAMPLERATES; ++i) {
 			output.supported_rates[i] = rates[i];
 		}
 	}
-	else {
+	else
+#else  
+	{
+#endif
 		if (!test_open(output.device, output.supported_rates, user_rates)) {
 			LOG_ERROR("unable to open output device: %s", output.device);
 			exit(0);

+ 1 - 1
components/squeezelite/vorbis.c

@@ -235,7 +235,7 @@ static decode_state vorbis_decode(void) {
 		count = frames * channels;
 
 		iptr = (s16_t *)write_buf + count;
-		optr = (ISAMPLE_T *)write_buf + frames * 2;
+		optr = (ISAMPLE_T *) outputbuf->writep + frames * 2;
 
 		if (channels == 2) {
 #if BYTES_PER_FRAME == 4