~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to include/wx/msw/sound.h

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        wx/msw/sound.h
 
3
// Purpose:     wxSound class
 
4
// Author:      Julian Smart
 
5
// Modified by:
 
6
// Created:     01/02/97
 
7
// RCS-ID:      $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $
 
8
// Copyright:   (c) Julian Smart
 
9
// Licence:     wxWindows licence
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#ifndef _WX_SOUND_H_
 
13
#define _WX_SOUND_H_
 
14
 
 
15
#if wxUSE_SOUND
 
16
 
 
17
class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
 
18
{
 
19
public:
 
20
    wxSound();
 
21
    wxSound(const wxString& fileName, bool isResource = false);
 
22
    wxSound(size_t size, const void* data);
 
23
    virtual ~wxSound();
 
24
 
 
25
    // Create from resource or file
 
26
    bool Create(const wxString& fileName, bool isResource = false);
 
27
 
 
28
    // Create from data
 
29
    bool Create(size_t size, const void* data);
 
30
 
 
31
    bool IsOk() const { return m_data != NULL; }
 
32
 
 
33
    static void Stop();
 
34
 
 
35
protected:
 
36
    void Init() { m_data = NULL; }
 
37
    bool CheckCreatedOk();
 
38
    void Free();
 
39
 
 
40
    virtual bool DoPlay(unsigned flags) const;
 
41
 
 
42
private:
 
43
    // data of this object
 
44
    class wxSoundData *m_data;
 
45
 
 
46
    wxDECLARE_NO_COPY_CLASS(wxSound);
 
47
};
 
48
 
 
49
#endif // wxUSE_SOUND
 
50
 
 
51
#endif // _WX_SOUND_H_
 
52