Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 62 lines (54 sloc) 1.752 kb
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
1 #ifndef _ENCODERWAV_H
2 #define _ENCODERWAV_H
3
4 /*
5 * Copyright (C) 2005-2008 Team XBMC
6 * http://www.xbmc.org
7 *
8 * This Program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
11 * any later version.
12 *
13 * This Program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with XBMC; see the file COPYING. If not, write to
20 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 * http://www.gnu.org/copyleft/gpl.html
22 *
23 */
24
25 #include "Encoder.h"
26 #include <stdio.h>
27
28 typedef struct
29 {
0a1b4b9 fixed: LINUX build errors
AlTheKiller authored
30 uint8_t riff[4]; /* must be "RIFF" */
31 uint32_t len; /* #bytes + 44 - 8 */
32 uint8_t cWavFmt[8]; /* must be "WAVEfmt " */
33 uint32_t dwHdrLen;
34 uint16_t wFormat;
35 uint16_t wNumChannels;
36 uint32_t dwSampleRate;
37 uint32_t dwBytesPerSec;
38 uint16_t wBlockAlign;
39 uint16_t wBitsPerSample;
40 uint8_t cData[4]; /* must be "data" */
41 uint32_t dwDataLen; /* #bytes */
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
42 }
43 WAVHDR, *PWAVHDR, *LPWAVHDR;
44
45 class CEncoderWav : public CEncoder
46 {
47 public:
48 CEncoderWav();
49 virtual ~CEncoderWav() {}
50 bool Init(const char* strFile, int iInChannels, int iInRate, int iInBits);
0a1b4b9 fixed: LINUX build errors
AlTheKiller authored
51 int Encode(int nNumBytesRead, uint8_t* pbtStream);
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
52 bool Close();
53 void AddTag(int key, const char* value);
54
55 private:
56 bool WriteWavHeader();
57
58 int m_iBytesWritten;
59 };
60
61 #endif // _ENCODERWAV_H
Something went wrong with that request. Please try again.