Permalink
Browse files

float magic

  • Loading branch information...
1 parent 40de400 commit 6b3443c598970c868c5618350ecbba9fe76b9c85 @lukeforeman committed Dec 1, 2012
View
3 README
@@ -1 +1,4 @@
+Added support for 32 bit LE float format audio
+
+
See github wiki for instructions.
View
2 src/glc/capture/alsa_capture.c
@@ -293,6 +293,8 @@ glc_audio_format_t alsa_capture_glc_format(snd_pcm_format_t pcm_fmt)
return GLC_AUDIO_S24_LE;
case SND_PCM_FORMAT_S32_LE:
return GLC_AUDIO_S32_LE;
+ case SND_PCM_FORMAT_FLOAT_LE:
+ return GLC_AUDIO_FLOAT_LE;
default:
return 0;
}
View
2 src/glc/capture/alsa_hook.c
@@ -236,6 +236,8 @@ glc_audio_format_t pcm_fmt_to_glc_fmt(snd_pcm_format_t pcm_fmt)
return GLC_AUDIO_S24_LE;
case SND_PCM_FORMAT_S32_LE:
return GLC_AUDIO_S32_LE;
+ case SND_PCM_FORMAT_FLOAT_LE:
+ return GLC_AUDIO_FLOAT_LE;
default:
return 0;
}
View
1 src/glc/capture/audio_capture.h
@@ -53,6 +53,7 @@ __PUBLIC int audio_capture_set_buffer(audio_capture_t audio_capture, ps_buffer_t
* * GLC_AUDIO_S16_LE
* * GLC_AUDIO_S24_LE
* * GLC_AUDIO_S32_LE
+ * * GLC_AUDIO_FLOAT_LE
* \param audio_capture audio_capture object
* \param format format
* \return 0 on success otherwise an error code
View
2 src/glc/common/glc.h
@@ -277,6 +277,8 @@ typedef u_int8_t glc_audio_format_t;
#define GLC_AUDIO_S24_LE 0x2
/** signed 32bit little-endian */
#define GLC_AUDIO_S32_LE 0x3
+/** signed 32bit little-endian */
+#define GLC_AUDIO_FLOAT_LE 0xe
/**
* \brief audio format message
View
3 src/glc/core/info.c
@@ -377,6 +377,9 @@ void audio_format_info(info_t info, glc_audio_format_message_t *fmt_message)
case GLC_AUDIO_S32_LE:
fprintf(info->stream, "GLC_AUDIO_S32_LE\n");
break;
+ case GLC_AUDIO_FLOAT_LE:
+ fprintf(info->stream, "GLC_AUDIO_FLOAT_LE\n");
+ break;
default:
fprintf(info->stream, "unknown format 0x%02x\n",
fmt_message->format);
View
2 src/glc/play/alsa_play.c
@@ -69,6 +69,8 @@ snd_pcm_format_t glc_fmt_to_pcm_fmt(glc_audio_format_t format)
return SND_PCM_FORMAT_S24_LE;
case GLC_AUDIO_S32_LE:
return SND_PCM_FORMAT_S32_LE;
+ case GLC_AUDIO_FLOAT_LE:
+ return SND_PCM_FORMAT_FLOAT_LE;
}
return 0;
}

0 comments on commit 6b3443c

Please sign in to comment.