2 * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Christopher ML Zumwalt May (zummy@users.sf.net)
8 #ifndef _PUSHGAMESOUND_H
9 #define _PUSHGAMESOUND_H
12 #include <StreamingGameSound.h>
16 class BPushGameSound
: public BStreamingGameSound
{
18 BPushGameSound(size_t inBufferFrameCount
,
19 const gs_audio_format
* format
,
20 size_t inBufferCount
= 2,
21 BGameSoundDevice
* device
= NULL
);
23 virtual ~BPushGameSound();
26 lock_failed
= -1, // not yet time to do more
27 lock_ok
= 0, // do more
28 lock_ok_frames_dropped
// you may have missed some buffers
31 virtual lock_status
LockNextPage(void** _pagePtr
,
33 virtual status_t
UnlockPage(void* pagePtr
);
35 virtual lock_status
LockForCyclic(void** _basePtr
, size_t* _size
);
36 virtual status_t
UnlockCyclic();
37 virtual size_t CurrentPosition();
39 virtual BGameSound
* Clone() const;
41 virtual status_t
Perform(int32 selector
, void* data
);
44 BPushGameSound(BGameSoundDevice
* device
);
46 virtual status_t
SetParameters(size_t bufferFrameCount
,
47 const gs_audio_format
* format
,
50 virtual status_t
SetStreamHook(void (*hook
)(void* inCookie
,
51 void* buffer
, size_t byteCount
,
52 BStreamingGameSound
* me
),
55 virtual void FillBuffer(void* buffer
, size_t byteCount
);
59 BPushGameSound(const BPushGameSound
& other
);
60 BPushGameSound
& operator=(const BPushGameSound
& other
);
63 bool BytesReady(size_t* bytes
);
65 virtual status_t
_Reserved_BPushGameSound_0(int32 arg
, ...);
66 virtual status_t
_Reserved_BPushGameSound_1(int32 arg
, ...);
67 virtual status_t
_Reserved_BPushGameSound_2(int32 arg
, ...);
68 virtual status_t
_Reserved_BPushGameSound_3(int32 arg
, ...);
69 virtual status_t
_Reserved_BPushGameSound_4(int32 arg
, ...);
70 virtual status_t
_Reserved_BPushGameSound_5(int32 arg
, ...);
71 virtual status_t
_Reserved_BPushGameSound_6(int32 arg
, ...);
72 virtual status_t
_Reserved_BPushGameSound_7(int32 arg
, ...);
73 virtual status_t
_Reserved_BPushGameSound_8(int32 arg
, ...);
74 virtual status_t
_Reserved_BPushGameSound_9(int32 arg
, ...);
75 virtual status_t
_Reserved_BPushGameSound_10(int32 arg
, ...);
76 virtual status_t
_Reserved_BPushGameSound_11(int32 arg
, ...);
77 virtual status_t
_Reserved_BPushGameSound_12(int32 arg
, ...);
78 virtual status_t
_Reserved_BPushGameSound_13(int32 arg
, ...);
79 virtual status_t
_Reserved_BPushGameSound_14(int32 arg
, ...);
80 virtual status_t
_Reserved_BPushGameSound_15(int32 arg
, ...);
81 virtual status_t
_Reserved_BPushGameSound_16(int32 arg
, ...);
82 virtual status_t
_Reserved_BPushGameSound_17(int32 arg
, ...);
83 virtual status_t
_Reserved_BPushGameSound_18(int32 arg
, ...);
84 virtual status_t
_Reserved_BPushGameSound_19(int32 arg
, ...);
85 virtual status_t
_Reserved_BPushGameSound_20(int32 arg
, ...);
86 virtual status_t
_Reserved_BPushGameSound_21(int32 arg
, ...);
87 virtual status_t
_Reserved_BPushGameSound_22(int32 arg
, ...);
88 virtual status_t
_Reserved_BPushGameSound_23(int32 arg
, ...);
102 uint32 _reserved
[12];
106 #endif // _PUSH_GAME_SOUND_H