~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/src/audio/codecs/alaw.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2011-04-05 14:14:13 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110405141413-hbwbunfsxpn2rtre
Tags: 0.9.13-1
* New upstream release
  - remove Debian patch (applied upstream)
* Fix watch file
* Remove unnecessary versioned dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
    public:
39
39
        // 8 PCMA A 8000 1 [RFC3551]
40
 
        Alaw (int payload=0)
 
40
        Alaw (int payload=8)
41
41
            : AudioCodec (payload, "PCMA") {
42
42
            _clockRate = 8000;
43
43
            _frameSize = 160; // samples, 20 ms at 8kHz
44
44
            _channel   = 1;
45
45
            _bitrate = 64;
46
46
            _bandwidth = 80;
 
47
            _hasDynamicPayload = false;
47
48
        }
48
49
 
49
50
        virtual ~Alaw() {}
50
51
 
51
52
        virtual int codecDecode (short *dst, unsigned char *src, unsigned int size) {
52
 
            // _debug("Decoded by alaw ");
53
53
            int16* end = dst+size;
54
54
 
55
55
            while (dst<end)
59
59
        }
60
60
 
61
61
        virtual int codecEncode (unsigned char *dst, short *src, unsigned int size) {
62
 
            // _debug("Encoded by alaw ");
63
62
            size >>= 1;
64
63
            uint8* end = dst+size;
65
64