]> git.saurik.com Git - wxWidgets.git/blame - utils/wxMMedia/sndwav.h
jconfig.h uses configures results
[wxWidgets.git] / utils / wxMMedia / sndwav.h
CommitLineData
4d6306eb
GL
1// /////////////////////////////////////////////////////////////////////////////
2// Name: sndwav.h
3// Purpose: wxMMedia
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_wav_H__
12#define __SND_wav_H__
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "mmriff.h"
18#include "sndfile.h"
19
20///
21class wxSndWavCodec : public wxSndFileCodec {
22 ///
23 DECLARE_DYNAMIC_CLASS(wxSndWavCodec)
24public:
25 ///
26 wxSndWavCodec();
27 ///
28 wxSndWavCodec(wxInputStream& s, bool preload = FALSE, bool seekable = TRUE);
29 ///
30 wxSndWavCodec(wxOutputStream& s, bool seekable = TRUE);
31 ///
32 wxSndWavCodec(const wxString& fname);
33 ///
34 virtual ~wxSndWavCodec();
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);
46
47protected:
48 wxRiffCodec riff_codec;
49 struct {
50 wxUint16 format;
51 wxUint16 channels;
52 wxUint32 sample_fq;
53 wxUint32 byte_p_sec;
54 wxUint16 byte_p_spl;
55 wxUint16 bits_p_spl;
56 } wav_hdr;
57};
58
59#endif