Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F627962
CStreamSound.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
CStreamSound.h
View Options
#pragma once
#include
"ISound.h"
#include
"SoundTypes.h"
#include
"threads.h"
#include
<set>
namespace
audio
{
class
ISoundSource
;
class
CSoundSource
;
extern
void
checkError
();
class
CStreamSound
:
public
ISound
{
public
:
CStreamSound
(
const
ISoundSource
*
sound
,
bool
is3D
,
bool
priority
);
~
CStreamSound
();
virtual
void
streamData
();
void
freeQueuedBuffers
();
virtual
bool
isStopped
()
const
;
virtual
bool
isPlaying
()
const
;
virtual
void
pause
();
virtual
void
resume
();
virtual
void
seek
(
int
timeMS
);
virtual
void
setLooped
(
bool
loop
);
virtual
bool
isLooped
()
const
;
virtual
void
stop
();
virtual
void
setPosition
(
float
x
,
float
y
,
float
z
);
virtual
void
setVelocity
(
float
x
,
float
y
,
float
z
);
virtual
void
setRolloff
(
float
factor
);
virtual
void
setLowPass
(
float
strength
);
virtual
void
setVolume
(
float
volume
);
virtual
void
setPitch
(
float
pitch
);
virtual
int
getPlayPosition
();
virtual
void
setPlayPosition
(
int
timeMs
);
virtual
int
getPlayLength
();
virtual
void
setMinDistance
(
float
minDist
);
virtual
void
setMaxDistance
(
float
maxDist
);
virtual
const
ISoundSource
*
getSoundSource
();
protected
:
mutable
threads
::
Mutex
lock
;
void
acquire
()
const
{
lock
.
lock
();
}
void
release
()
const
{
checkError
();
lock
.
release
();
}
const
CSoundSource
*
soundSource
;
sourceID
soundID
,
filterID
;
bool
streaming
;
long
streamPos
;
bool
loop
;
unsigned
timestamp
;
unsigned
byterate
;
bufferID
resetStampID
;
std
::
set
<
bufferID
>
buffers
;
};
};
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 3:04 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152040
Default Alt Text
CStreamSound.h (1 KB)
Attached To
Mode
R80 StarRuler2-Source
Attached
Detach File
Event Timeline