Steve Checkoway
84dc0ea84c
Simplify compilation instructions.
2006-12-10 13:24:30 +00:00
Steve Checkoway
5e87581379
No need to assert, these are only used in once place and the preconditions are checked. Remove dependence on RageUtil (and global.h). Makes this easier to test.
2006-12-10 13:24:06 +00:00
Steve Checkoway
1c2fa7eff6
Ensure that the precondition is satisfied before calling those functions. Perhaps I'll fix the code to handle misaligned addresses at some point.
2006-12-10 13:13:47 +00:00
Steve Checkoway
afa3284614
Intel instructions. SSE code tested and works.
2006-12-10 13:07:27 +00:00
Steve Checkoway
835bac88dd
Test other read function while I am at it.
2006-12-10 12:07:25 +00:00
Steve Checkoway
7f02063b35
Add test for vector implementation of the sound mix buffer functions.
2006-12-10 11:38:44 +00:00
Steve Checkoway
c850d0d86c
Remove bogus assert. As long as dest is on a 4 byte boundary and src is on a 2 byte boundary (which gcc will ensure unless you're casting into to those types), this works correct. (Retested.)
2006-12-10 11:08:17 +00:00
Steve Checkoway
1cf1734d5a
Fix window bug.
2006-12-10 10:20:32 +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
Steve Checkoway
95a08d5740
Add files.
2006-12-10 09:01:43 +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
Chris Danford
77d3971fd4
virtual on overridden virtuals for clarity
2006-12-10 08:18:46 +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
Chris Danford
e6e37f9566
handle C* scroll speeds when drawing the board
2006-12-10 05:24:12 +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