Glenn Maynard
cfaa20c6fc
prebuffer small sounds to reduce buffering threads. This differs
...
from preloading; this loads the file directly, before decompression,
so it can load much longer sounds, which avoids any disk access
so no buffering thread is needed.
2007-02-21 11:14:17 +00:00
Glenn Maynard
0191581eab
remove unused GetSampleRate
2007-01-27 09:26:27 +00:00
Glenn Maynard
322ebd5baa
remove RageSound::GetAbsoluteVolume; use "Volume" property instead
2007-01-27 07:32:13 +00:00
Glenn Maynard
1bf9de3543
float
2007-01-27 07:18:52 +00:00
Glenn Maynard
bf40f3aa98
fix buffer alignment; caused static in mono sounds
2007-01-26 09:28:00 +00:00
Steve Checkoway
2407d46dbf
Fix compile.
2007-01-20 06:55:23 +00:00
Glenn Maynard
0e0391007c
int16_t
2007-01-20 01:12:25 +00:00
Glenn Maynard
29edd8be6c
use RageSoundReader_PostBuffering
2007-01-19 09:18:53 +00:00
Glenn Maynard
8758708e5a
update comment
2007-01-19 01:07:54 +00:00
Glenn Maynard
e2d9d65065
add RageSound::PlayCopy
2007-01-18 08:41:47 +00:00
Glenn Maynard
32a9a47f87
remove RageSoundManager::PlaySound
2007-01-18 08:34:52 +00:00
Glenn Maynard
4eb20f1e79
remove unsafe return value
2007-01-18 08:32:37 +00:00
Glenn Maynard
a2d63e2767
RageSound::DeleteSelfWhenFinishedPlaying(). Replaces RageSoundManager::DeleteSoundWhenFinished, without needing to poll every sound in the list every frame and without any extra locking.
2007-01-18 08:16:10 +00:00
Glenn Maynard
f5e7833adb
Don't lock while calling SOUNDMAN driver calls (mutex ordering requirement).
2007-01-18 07:28:51 +00:00
Glenn Maynard
eaf12eb84f
remove SetPositionSeconds. Use m_Param.m_StartSecond.
2006-12-23 22:30:35 +00:00
Glenn Maynard
ff8237c56b
set start position in RageSound::StartPlaying
2006-12-23 22:28:17 +00:00
Glenn Maynard
8a8976c460
merge RageSound::GetPositionSeconds and GetPositionSecondsInternal; fix lock order
2006-12-23 11:31:10 +00:00
Glenn Maynard
ecb93a7fd2
call SOUNDMAN->GetPosition unlocked (driver call), and GetSourceFrameFromHardwareFrame locked; also simpler (GetPositionSecondsInternal uses m_iStoppedSourceFrame)
2006-12-23 11:01:09 +00:00
Glenn Maynard
880490e4c2
split out RageSound::GetSourceFrameFromHardwareFrame
2006-12-23 10:56:40 +00:00
Glenn Maynard
bc097b6b03
clamp hardware frames in RageSoundDriver, instead of in each sound
2006-12-23 10:53:39 +00:00
Glenn Maynard
ec08155a86
simplify
2006-12-23 10:33:53 +00:00
Glenn Maynard
98a3d5f856
more consistent code path: call SoundIsFinishedPlaying when the driver stops mixing, even if it's due to RageSoundDriver::StopMixing
2006-12-23 10:32:37 +00:00
Glenn Maynard
71f3bc0a75
fix comment
2006-12-23 10:28:29 +00:00
Glenn Maynard
80059b308b
fix possible lock order problem
2006-12-23 10:27:21 +00:00
Glenn Maynard
5dac62ea7d
reset m_iMaxDriverFrame in RageSound::SoundIsFinishedPlaying, like StopPlaying
2006-12-23 10:15:23 +00:00
Glenn Maynard
9aaa59f26f
remove id, registration; no longer needed
2006-12-23 10:07:20 +00:00
Glenn Maynard
b97d8971f9
missed GetError commit
2006-12-23 10:04:49 +00:00
Glenn Maynard
e7c9bb14c4
remove id, registration; no longer needed
2006-12-23 10:02:08 +00:00
Glenn Maynard
00f371fa7c
remove IsStreamingFromDisk
2006-12-23 07:15:32 +00:00
Glenn Maynard
edf8e73149
clarify
2006-12-23 04:27:41 +00:00
Glenn Maynard
0c88ceaa4b
simplify
2006-12-23 04:23:19 +00:00
Glenn Maynard
76e3f6a14a
simplify: remove RageSound::Fail
2006-12-23 04:16:21 +00:00
Glenn Maynard
9873757c06
merge GetData and GetDataToPlay; simplify
2006-12-23 04:13:18 +00:00
Glenn Maynard
9c8bd97190
remove unused
2006-12-23 04:07:46 +00:00
Glenn Maynard
6cc5a881bc
cleanup
2006-12-23 04:06:42 +00:00
Glenn Maynard
39d435c186
unneeded
2006-12-23 04:05:58 +00:00
Glenn Maynard
ce0308b234
return errors
2006-12-23 03:49:06 +00:00
Glenn Maynard
f2eb0043de
remove RageSound::IsStreamingFromDisk
2006-12-23 01:16:37 +00:00
Glenn Maynard
c415651f58
cleanup; fix early out
2006-12-23 01:13:45 +00:00
Glenn Maynard
bafea3b7ab
GetPosition() -> GetHardwareFrame; handle timing retry in the driver,
...
so the logic is available to the driver
2006-12-22 22:22:01 +00:00
Glenn Maynard
4dd1f97875
remove unused
2006-12-22 21:56:02 +00:00
Glenn Maynard
dddf431e42
use RageSoundReader_ThreadedBuffer
2006-12-22 21:46:03 +00:00
Glenn Maynard
a583d179ca
don't clamp iFrames when seeking
2006-12-22 21:44:36 +00:00
Glenn Maynard
b88f5da9ef
comments
2006-12-22 21:43:22 +00:00
Glenn Maynard
6344552161
use RageSoundReader_Extend to implement some features
2006-12-22 21:41:28 +00:00
Glenn Maynard
24624a5c92
GetDataToPlay API more like RSR::Read
2006-12-22 21:24:19 +00:00
Glenn Maynard
3a1d1e129f
use RetriedRead
2006-12-22 06:14:20 +00:00
Glenn Maynard
fa33890a78
fix RageSoundReader_Silence END_OF_FILE
2006-12-21 23:41:02 +00:00
Glenn Maynard
aa4be6dffb
Return 1 from SetPosition(n) on success, 0 on seek past EOF, not
...
"the position seeked to". This fixes a special case: SetPosition(n)
returning 0 was EOF except when SetPosition(0). The returned value
on success was always n, anyway; we never seek to a different position
and return success.
2006-12-21 05:07:49 +00:00
Glenn Maynard
1786d99735
GetPositionSeconds(&tm) returns the clock time timestamp associated with the
...
returned sound time. This is tricky: we may be interrupted, causing timing error.
We tried working around this by trying to hint the scheduler that we're in a
period where we don't want to be interrupted, even though we're in a thread
that's not normally high priority, by boosting the priority temporarily. This
worked in Windows, but not in general; it's too far out of the expectations of
schedulers and generally just made things worse.
Let's look at this like an interruption-based lockless algorithm: try it, see
if it succeeded, and if it failed, try again.
Retrying even once should be a rare exception, but failsafe anyway, so a bug
in a sound driver won't hang.
2006-12-19 08:00:45 +00:00