librhpi ogg vorbis patch
Click here to get the file
Size
2.3 kB
-
File type
text/x-patch
File contents
Index: ChangeLog
===================================================================
RCS file: /home/cvs/srl/librhpi/ChangeLog,v
retrieving revision 1.64
diff -u -B -b -w -r1.64 ChangeLog
--- ChangeLog 15 Dec 2006 21:03:30 -0000 1.64
+++ ChangeLog 19 Dec 2006 00:12:58 -0000
@@ -274,3 +274,6 @@
* Modified the build system to autodetect the presence of Qt.
* Added an AR_HAVE_LIBRADIO macro in 'autoinclude.m4'.
* Modified the build system to autodetect the presence of LibRadio.
+2006-12-18 Darrick Servis <darrick@dcn.org>
+ * Added support for OggVorbis in lib/rhpiplaystream.cpp and
+ lib/rhpirecordstream.cpp.
Index: lib/rhpiplaystream.cpp
===================================================================
RCS file: /home/cvs/srl/librhpi/lib/rhpiplaystream.cpp,v
retrieving revision 1.24
diff -u -B -b -w -r1.24 rhpiplaystream.cpp
--- lib/rhpiplaystream.cpp 19 Oct 2006 13:39:57 -0000 1.24
+++ lib/rhpiplaystream.cpp 19 Dec 2006 00:09:41 -0000
@@ -242,6 +242,13 @@
return false;
}
break;
+ case WAVE_FORMAT_VORBIS:
+ // libradio decodes vorbis to signed 16 for us. Although we've asked doubt ASI adapters will have hardware vorbis decoders.
+ if(formatSupported(RWaveFile::Vorbis) && formatSupported(RWaveFile::Pcm16))
+ return true;
+ else
+ return false;
+ break;
default:
return false;
@@ -511,6 +518,7 @@
&data_to_play,&samples_played,&reserved);
switch(getFormatTag()) {
case WAVE_FORMAT_PCM:
+ case WAVE_FORMAT_VORBIS:
samples_pending=data_to_play/(getChannels()*getBitsPerSample()/8);
break;
Index: lib/rhpirecordstream.cpp
===================================================================
RCS file: /home/cvs/srl/librhpi/lib/rhpirecordstream.cpp,v
retrieving revision 1.18
diff -u -B -b -w -r1.18 rhpirecordstream.cpp
--- lib/rhpirecordstream.cpp 19 Oct 2006 13:39:57 -0000 1.18
+++ lib/rhpirecordstream.cpp 19 Dec 2006 00:09:41 -0000
@@ -263,6 +263,13 @@
return false;
}
break;
+ case WAVE_FORMAT_VORBIS:
+ // libradio encodes signed 16 to vorbis for us. Although we've asked doubt ASI adapters will have hardware vorbis decoders.
+ if(formatSupported(RWaveFile::Vorbis) && formatSupported(RWaveFile::Pcm16))
+ return true;
+ else
+ return false;
+ break;
default:
return false;