~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/ADM_audiocodec/ADM_codecwav.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-12-15 17:13:20 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061215171320-w79pvpehxx2fr217
Tags: 1:2.3.0-0.0ubuntu1
* Merge from debian-multimedia.org, remaining Ubuntu change:
  - desktop file,
  - no support for ccache and make -j.
* Closes Ubuntu: #69614.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
}
40
40
 
41
 
void ADM_AudiocodecWav::purge()
42
 
{
43
 
 
44
 
}
45
41
uint8_t ADM_AudiocodecWav::beginDecompress()
46
42
{
47
43
         return 1;
60
56
{
61
57
        return 1;
62
58
}
63
 
uint8_t ADM_AudiocodecWav::run( uint8_t * ptr, uint32_t nbIn, uint8_t * outptr,   uint32_t * nbOut)
 
59
uint8_t ADM_AudiocodecWav::run(uint8_t * inptr, uint32_t nbIn, float * outptr, uint32_t * nbOut)
64
60
{
65
 
                
66
 
 
67
 
                memcpy(outptr,ptr,nbIn);
68
 
                *nbOut=nbIn;
69
 
       return 1;
 
61
        int16_t *in = (int16_t *) inptr;
 
62
 
 
63
        *nbOut=nbIn / 2;
 
64
        for (int i = 0; i < *nbOut; i++) {
 
65
                *(outptr++) = (float)*in / 32768;
 
66
                in++;
 
67
        }
 
68
 
 
69
        return 1;
70
70
}
71
71
 
72
72