Glenn Maynard
a42e1bcbfb
InputHandler::Create
2006-12-17 07:42:02 +00:00
Glenn Maynard
17c32b90c2
Make* -> Driver::Create. Having these floating in arch.h isn't
...
useful; if you create the class, you need the class definition to
free it, and anyone creating a class is probably going to use it,
too.
2006-12-17 07:41:21 +00:00
Glenn Maynard
50ca6633cb
cleanup
2006-12-17 07:33:09 +00:00
Glenn Maynard
fc6033d754
cleanup
2006-12-17 07:16:06 +00:00
Glenn Maynard
a8dc57f38e
merge duplicate boilerplate code
2006-12-17 07:15:25 +00:00
Glenn Maynard
274b8acfae
update
2006-12-17 07:10:07 +00:00
Glenn Maynard
2b9a167455
add RageDriver to merge duplicate boilerplate code
2006-12-17 07:06:53 +00:00
Glenn Maynard
519e61ee48
style cleanup
2006-12-17 07:04:43 +00:00
Glenn Maynard
d4f43cf844
reduce boilerplate code
2006-12-17 07:00:30 +00:00
Glenn Maynard
f55345ad84
update
2006-12-17 06:56:31 +00:00
Glenn Maynard
9447322729
CreateClass helper
2006-12-17 06:53:52 +00:00
Glenn Maynard
4bd423fa10
remove monolithic arch.cpp
2006-12-17 06:49:52 +00:00
Glenn Maynard
bcec908ebf
split out MakeMemoryCardDriver
2006-12-17 06:49:25 +00:00
Glenn Maynard
ad698b2c26
split out MakeLoadingWindow
2006-12-17 06:47:57 +00:00
Glenn Maynard
c7f82f0529
split out MakeLowLevelWindow, MakeLightsDrivers
2006-12-17 06:46:02 +00:00
Glenn Maynard
5255fa036c
fixup
2006-12-17 06:45:49 +00:00
Glenn Maynard
21be9b5cf1
split out MakeLightsDrivers
2006-12-17 06:45:06 +00:00
Glenn Maynard
3461ab8c4e
split out MakeLowLevelWindow
2006-12-17 06:42:47 +00:00
Glenn Maynard
799f20d8d1
unreachable (we check for this outside), and we can return NULL anyway, if all drivers fail
2006-12-17 06:17:56 +00:00
Glenn Maynard
fb968d435d
uhh
2006-12-17 06:15:13 +00:00
Glenn Maynard
e63698aa43
add LightsDriver_Export
2006-12-17 03:18:26 +00:00
Glenn Maynard
91bee90f1c
remove unused
2006-12-16 23:00:31 +00:00
Glenn Maynard
59b35c19bb
simplify stream configuration
2006-12-16 22:45:44 +00:00
Glenn Maynard
3f3e6cd480
fix init order warning
2006-12-16 22:12:20 +00:00
Glenn Maynard
45ee492808
LoadActor(path)(args) -> LoadActor(path, args)
2006-12-15 23:04:47 +00:00
Glenn Maynard
1cf89233a8
rename LoadActor to LoadActorFunc
...
allow level param to LoadActorFunc
LoadActor now evaluates the function; arguments can be passed
directly to LoadActor; use LoadActorFunc if you want to get the
factory directly
2006-12-15 23:03:47 +00:00
Glenn Maynard
b700578675
remove unused param
2006-12-15 21:23:37 +00:00
Glenn Maynard
ebd0ca28b5
implement swap, operator=, block sizes
2006-12-14 19:37:57 +00:00
Glenn Maynard
622d6b433b
default buffer size of 512
2006-12-14 10:57:37 +00:00
Glenn Maynard
a348425d23
fix RageSoundReader_Pan::Read logic
2006-12-14 02:32:33 +00:00
Glenn Maynard
4418f202f4
update comment
2006-12-13 22:30:35 +00:00
Glenn Maynard
5bfc731036
remove old GetPCM
2006-12-13 18:40:02 +00:00
Glenn Maynard
7fecf43f1d
update comment
2006-12-13 18:38:07 +00:00
Glenn Maynard
95f72debdc
remove pSound param
2006-12-13 09:17:48 +00:00
Glenn Maynard
2377925f41
remove iRate param
2006-12-13 09:15:29 +00:00
Glenn Maynard
0f76adec67
GetSampleRate(int) -> GetSampleRate(); one sample rate
...
per driver
2006-12-13 09:13:41 +00:00
Glenn Maynard
f75a281c18
GetPosition(pSound) -> GetPosition(); one hardware sound position
...
per driver
2006-12-13 09:10:08 +00:00
Glenn Maynard
fb9639f52c
remove RageSoundDriver_DSound (complicated hardware mixer)
2006-12-13 08:58:40 +00:00
Glenn Maynard
fae5e9fafa
remove RageSoundDriver_ALSA9 (complicated hardware mixer)
2006-12-13 08:56:56 +00:00
Glenn Maynard
873a979b06
make GetSource virtual
2006-12-13 08:47:05 +00:00
Glenn Maynard
893e9d9e53
units are samples, not bytes
2006-12-12 02:47:35 +00:00
Glenn Maynard
f33bb09334
use default
2006-12-11 05:59:27 +00:00
Glenn Maynard
a62b963fb8
make GetNumChannels pure virtual
...
not 1 or 2 anymore; RageSound only supports 1 or 2 but intermediate
filters may have more
2006-12-10 09:04:58 +00:00
Glenn Maynard
ef5c5e20c1
SetPosition
2006-12-10 09:01:05 +00:00
Glenn Maynard
7385c1f4c1
merge SetPosition_Accurate and SetPosition_Fast. Use a property
...
instead.
2006-12-10 08:59:13 +00:00
Glenn Maynard
87cba64986
ratio fixup
2006-12-10 07:34:35 +00:00
Glenn Maynard
7d0754c2a6
update
2006-12-10 07:20:13 +00:00
Glenn Maynard
ecbbe89f1a
Read() update
2006-12-10 07:17:58 +00:00
Glenn Maynard
5ad35cc6c6
add a failsafe; this runs in a high-priority thread
2006-12-10 07:12:20 +00:00
Glenn Maynard
0b529a4960
RageSoundReader::Read() returns sound data which may be at a
...
different rate than the source it's reading from; one second
of returned data may correspond to two seconds in the source
material.
GetStreamToSourceRatio returns the ratio of returned data in
the next Read() call to source data. This is propagated
upwards in the filter tree, so rate changes by a speed changer
in the middle of the tree will be reflected in the final
GetStreamToSourceRatio().
This means that whenever the ratio changes, Read() stops
returning data; it returns whatever it has, so the caller
has an opportunity to call GetStreamToSourceRatio again
and notice the change.
These semantics can be annoying to implement in some
cases, where only the processing of Read() may notice
a ratio change. Read() may want to return 0, to say
"something changed, call GetStreamToSourceRatio again",
but 0 means EOF.
Add RageSoundReader::END_OF_FILE. 0 is now no
longer a special case; it means "there's more data, I
just didn't return any this time". This is functionally
equivalent to errno EINTR.
2006-12-10 07:08:17 +00:00
Glenn Maynard
2f1782d892
merge Read and ReadBlock
2006-12-10 05:41:41 +00:00
Glenn Maynard
04b2933af6
simplify and correct. If Read (and ReadBlock) doesn't return as much data as requested, it may be because the rate is changing.
2006-12-10 05:32:03 +00:00
Glenn Maynard
9a55b8d28a
remove unused
2006-12-10 05:18:33 +00:00
Glenn Maynard
da55d82dec
unused decl
2006-12-10 04:51:18 +00:00
Glenn Maynard
0b93b3a1af
cleanup
2006-12-10 04:46:36 +00:00
Glenn Maynard
db25cf4738
add filter differently
2006-12-10 04:44:39 +00:00
Glenn Maynard
0eaab20da5
split out LoadAutoplaySoundsInto
2006-12-10 04:42:39 +00:00
Glenn Maynard
3859d3b7bc
implement GetNumChannels to simplify (if mono, send mono sound,
...
not stereo)
2006-12-10 04:20:22 +00:00
Glenn Maynard
f97d80afdc
fix iSize == 0 (Extend < 0)
2006-12-10 04:06:33 +00:00
Glenn Maynard
c19f079cc6
update
2006-12-10 04:05:14 +00:00
Glenn Maynard
ef519723fb
fix warning
2006-12-10 04:04:50 +00:00
Glenn Maynard
173f6758c0
add RageSoundReader_ChannelSplit
2006-12-10 04:03:26 +00:00
Glenn Maynard
3c85a8e3a7
update test
2006-12-10 04:01:53 +00:00
Glenn Maynard
1da6f85125
fix text
2006-12-10 03:57:23 +00:00
Glenn Maynard
25e67dd4dc
RageSoundReader::Read(buf, unsigned bytes) -> (buf, int frames);
...
return value in frames, not bytes
2006-12-10 03:56:36 +00:00
Glenn Maynard
7bcb489288
buffering fixes
2006-12-10 03:34:44 +00:00
Glenn Maynard
e0dde38b2e
don't seek sources below 0
2006-12-10 03:32:56 +00:00
Glenn Maynard
2b95cdcce9
comment
2006-12-10 01:00:17 +00:00
Glenn Maynard
8c7173f26c
use RageSoundReader_Pan for panning
2006-12-10 00:43:51 +00:00
Glenn Maynard
602db9c431
bind SetProperty
2006-12-10 00:36:27 +00:00
Glenn Maynard
d30d0c0e76
expose SetProperty
2006-12-09 23:54:33 +00:00
Glenn Maynard
048de864a2
cleanup
2006-12-09 23:52:10 +00:00
Glenn Maynard
e141795020
SetPlayerBalance -> GetPlayerBalance
2006-12-09 23:51:08 +00:00
Glenn Maynard
204d081b09
`RageSoundReader_ChannelSplit
2006-12-09 23:36:53 +00:00
Glenn Maynard
fa5a6102f4
add stride
2006-12-09 22:43:44 +00:00
Glenn Maynard
4e73095fce
RageSoundReader_Pan
2006-12-09 22:42:23 +00:00
Glenn Maynard
84c5c0a865
Simplify RSR_Chain. Allow passing in sound readers directly.
...
If all sounds have one channel and nothing pans, keep one channel.
Use RSR_Pan.
2006-12-09 22:40:39 +00:00
Glenn Maynard
77401ed8d3
add RageSoundReader_Pan
2006-12-09 22:37:57 +00:00
Glenn Maynard
381fc45cfd
fix RageSoundReader_Chain::GetNextSourceFrame
2006-12-09 22:10:17 +00:00
Glenn Maynard
18d44445e3
unindent
2006-12-09 20:01:41 +00:00
Glenn Maynard
aebfd2af2e
fix uninitialized
2006-12-09 20:01:13 +00:00
Glenn Maynard
130012f3b2
toc was too inaccurate for precise seeking; this was obscured by the earlier seek bug.
2006-12-09 19:55:26 +00:00
Glenn Maynard
6333bb5952
100000 is correct (ms * percent = 1000 * 100); 100 is just masking a bug somewhere else ...
2006-12-09 09:23:32 +00:00
Glenn Maynard
50bca42217
update test for SetPosition
2006-12-09 08:49:35 +00:00
Glenn Maynard
ba58784e68
if not synthing, the buffer may have data used. mad->Timer is the time of the beginning of this MP3 frame; make sure the "skip data in the buffer" logic always works by putting the buffer back to the beginning of the MP3 frame
2006-12-09 08:48:28 +00:00
Glenn Maynard
1ba68d8469
fix seeking with SetPosition_hard if the position lies in the first MP3 frame
2006-12-09 08:43:59 +00:00
Glenn Maynard
c82cf0be7a
synth_output always clears outpos
2006-12-09 08:42:19 +00:00
Glenn Maynard
d24f70800d
length is in ms
2006-12-09 08:26:08 +00:00
Glenn Maynard
ca67a9cb7c
change SetPosition_Accurate and SetPosition_Fast to take and return frames
2006-12-09 06:35:09 +00:00
Glenn Maynard
a272414497
cosmetic: remove indentation
2006-12-09 03:51:46 +00:00
Glenn Maynard
f1b5f9b53b
simplify
2006-12-09 03:51:32 +00:00
Glenn Maynard
81b3232453
simplify iFrames
2006-12-09 03:50:06 +00:00
Glenn Maynard
6fa2581a58
comment
2006-12-09 03:45:49 +00:00
Glenn Maynard
f2ae34e517
cleanup
2006-12-09 03:44:36 +00:00
Glenn Maynard
0e72d6d08c
cosmetic
2006-12-09 03:40:55 +00:00
Glenn Maynard
3583b1cf10
this reader is not limited to 2 channels
2006-12-09 02:56:30 +00:00
Glenn Maynard
a86fd32253
style
2006-12-08 03:59:54 +00:00
Glenn Maynard
9be22d5032
define SURROUND masks
...
for now, use KSAUDIO_SPEAKER_5POINT1 instead of
KSAUDIO_SPEAKER_5POINT1_SURROUND (according
to http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/SpkrConfig5.doc );
maybe try the SURROUND one as a fallback
2006-12-07 07:48:45 +00:00
Glenn Maynard
c835b2b01b
code style
2006-12-07 07:32:31 +00:00
Glenn Maynard
d0153d06b3
remove unused
2006-12-07 02:51:08 +00:00