sipxmedialib  Version 3.3
MpAudioFileUtils.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2006 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef MP_AUDIO_FILE_UTILS_H
16 #define MP_AUDIO_FILE_UTILS_H
17 
18 #include <os/iostream>
19 
20 typedef short AudioSample;
21 
22 // Utils functions to handle the audiofile
23 
25 long readIntMsb(istream &in, int bytes);
26 
28 long bytesToIntMsb(void *buff, int bytes);
29 
31 long readIntLsb(istream &in, int bytes);
32 
34 long bytesToIntLsb(void *buff, int bytes);
35 
37 void skipBytes(istream &in, int bytes);
38 
40 void writeIntMsb(ostream &out, long l, int bytes);
41 
43 void writeIntLsb(ostream &out, long l, int bytes);
44 
45 
46 #endif
long readIntLsb(istream &in, int bytes)
Least Siginificant Bytes: read int.
Definition: MpAudioFileUtils.cpp:35
void writeIntMsb(ostream &out, long l, int bytes)
write int in Most Significant bytes
Definition: MpAudioFileUtils.cpp:58
short AudioSample
Definition: MpAudioFileUtils.h:20
void writeIntLsb(ostream &out, long l, int bytes)
Write int in Least Significant bytes.
Definition: MpAudioFileUtils.cpp:65
void skipBytes(istream &in, int bytes)
Skip one byte.
Definition: MpAudioFileUtils.cpp:52
long bytesToIntMsb(void *buff, int bytes)
Most Significant Bytes: change bytes to int.
Definition: MpAudioFileUtils.cpp:26
long bytesToIntLsb(void *buff, int bytes)
Least significant byte: byte to int.
Definition: MpAudioFileUtils.cpp:43
long readIntMsb(istream &in, int bytes)
Read int from Most Significant Bytes.
Definition: MpAudioFileUtils.cpp:18