Hi all!
I was trying to write an application based on SEMS 1.5.0, that would
record the incoming RTP stream into an audiofile.
I wanted to use wav with PCMA subtype ("wav|A-law"), but here is what I
have experienced:
The format type field in the wave header changed to WAV_ALAW (6), but
the payload failed to be set accordingly. It remained PCM16. I
investigated a little bit and found that somehow a getCodec() call gets
in before the subtype gets to be set.
(AmAudioFile.cpp:AmAudioFileFormat::AmAudioFileFormat) And that already
sets the codec to PCM16.
I did not get to the root of the problem, but I'm attaching a quickfix
for this.
Bests,
Tibor Karakó
Index: core/AmAudioFile.cpp
===================================================================
--- core/AmAudioFile.cpp (revision 20319)
+++ core/AmAudioFile.cpp (revision 20320)
@@ -35,8 +35,10 @@
: name(name), subtype(subtype), p_subtype(0)
{
getSubtype();
- codec = getCodec();
-
+ codec_id = getCodecId(); // quickfix for subtype detection, somehow a getCodec() call gets in before getSubtype()
+ resetCodec();
+// codec = getCodec();
+
if(p_subtype && codec){
rate = p_subtype->sample_rate;
channels = p_subtype->channels;
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev