]> git.saurik.com Git - wxWidgets.git/blame - utils/wxMMedia/sndaiff.h
* wxStream fixes (integer/line parsing).
[wxWidgets.git] / utils / wxMMedia / sndaiff.h
CommitLineData
4d6306eb
GL
1// /////////////////////////////////////////////////////////////////////////////
2// Name: sndaiff.h
3// Purpose: wxMMedia Aiff Codec
4// Author: Guilhem Lavaux
5// Created: 1997
6// Updated: February 1998
7// Copyright: (C) 1997, 1998, Guilhem Lavaux
8// License: wxWindows license
9// /////////////////////////////////////////////////////////////////////////////
10/* Real -*- C++ -*- */
11#ifndef __SND_aiff_H__
12#define __SND_aiff_H__
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "mmriff.h"
18#include "sndfile.h"
19
20///
21class wxSndAiffCodec : public wxSndFileCodec {
22 ///
23 DECLARE_DYNAMIC_CLASS(wxSndAiffCodec)
24public:
25 ///
26 wxSndAiffCodec();
27 ///
28 wxSndAiffCodec(wxInputStream& s, bool preload = FALSE, bool seekable = TRUE);
29 ///
30 wxSndAiffCodec(wxOutputStream& s, bool seekable = TRUE);
31 ///
32 wxSndAiffCodec(const wxString& fname);
33 ///
34 virtual ~wxSndAiffCodec();
35
36 virtual bool OnNeedData(char *buf, wxUint32 size);
37 virtual bool OnWriteData(char *buf, wxUint32 size);
38
39 virtual wxUint32 PrepareToPlay();
40 virtual bool PrepareToRecord(wxUint32 file_size);
41
42 virtual void SetFile(wxInputStream& s, bool preload = FALSE,
43 bool seekable = FALSE);
44 virtual void SetFile(wxOutputStream& s,
45 bool seekable = FALSE);
46protected:
47 void ParseCOMM();
48 void ParseSSND();
49
50 void WriteCOMM();
51 void WriteSSND(wxUint32 file_size);
52
53protected:
54 wxUint32 m_spos, m_slen;
55 wxUint32 m_chunksize;
56};
57
58#endif