Commit graph

17 commits

Author SHA1 Message Date
Karl Blomster
0badb4059f Restructured audio providing a bit. If a provider cannot provide 16-bit mono audio with a sample rate higher than 32kHz, an intermediate converting provider will be inserted to fix it. Made the lavc audio provider rely on this for downmixing instead of doing it with libavcodec (used to fail on audio with >2 channels).
Originally committed to SVN as r2265.
2008-07-16 13:22:06 +00:00
Karl Blomster
6bec0322e4 split out the downmixing audio provider into its own .h/.cpp, in preparation for using it in the ffmpeg audio provider.
Originally committed to SVN as r2257.
2008-07-15 21:31:09 +00:00
Niels Martin Hansen
923b347356 Some more checking in PCM provider. Had apparently missed a way EnsureRangeAceesibleble() could fail. This means of failure should no longer be possible.
Originally committed to SVN as r2240.
2008-07-05 12:50:49 +00:00
Niels Martin Hansen
3d13fcfe5f Fix some minor warnings when building on GCC.
Originally committed to SVN as r2237.
2008-07-04 12:34:02 +00:00
Niels Martin Hansen
d01b4ec3e9 Yet some more sanity/error checking, although it should never be triggered.
Originally committed to SVN as r2235.
2008-07-04 11:59:28 +00:00
Niels Martin Hansen
0d56463aa4 A bit additional commenting and sanity checking in PCM provider.
Originally committed to SVN as r2234.
2008-07-04 11:37:45 +00:00
Niels Martin Hansen
2c7da25e91 Avoid strncmp() for checking fourCC codes and use a handcrafted function for it instead. Also add some assertions for null pointer checks.
Originally committed to SVN as r2231.
2008-07-04 03:06:55 +00:00
Niels Martin Hansen
d1b8355ff2 Rename endian.h to aegisub_endian.h to avoid clash with system headers on some systems.
Originally committed to SVN as r2223.
2008-07-03 13:35:23 +00:00
Niels Martin Hansen
a7b64fe694 Make PCM WAV reading (almost) machine endian neutral. The actual sample data read are still assumed to be in machine endian, which will produce garbage output on big endian archs.
Originally committed to SVN as r2222.
2008-07-03 02:22:18 +00:00
pstatic
cbf7143b85 typo in audio_provider_pcm
Originally committed to SVN as r2131.
2008-03-24 02:44:45 +00:00
Niels Martin Hansen
08910b5a9d Make PCM audio provider access the file memory mapped instead of through regular file access, per bug #686. Tested to work on Windows.
I've also added a POSIX implementation but it's untested and might not even build.
The implementation is not actually thread safe, but this shouldn't be a problem in most cases, yet. It should still be fixed at some point.

Originally committed to SVN as r2130.
2008-03-24 00:10:09 +00:00
Rodrigo Braz Monteiro
c248ca39f2 Fixed several warnings on g++.
Originally committed to SVN as r2044.
2008-03-13 18:55:09 +00:00
Niels Martin Hansen
89d076c760 Apparently long long isn't safe, trying with int64_t instead then...
Originally committed to SVN as r1547.
2007-08-31 14:11:35 +00:00
Niels Martin Hansen
8909ea48e2 Replace all (applicable) instances of __int64 with long long. (All except those in foreign header files.)
Originally committed to SVN as r1540.
2007-08-29 13:36:30 +00:00
Niels Martin Hansen
044f104a2e Forgot to remove some debugging messages from the PCM audio provider, making using any other audio provider really annoying.
Originally committed to SVN as r1530.
2007-08-23 23:08:33 +00:00
Niels Martin Hansen
128dd0df0f What a fix, #113 (direct PCM WAV reading) now quite much implemented and working.
Originally committed to SVN as r1529.
2007-08-22 21:06:16 +00:00
Niels Martin Hansen
93f6ef6d7a Issue #113 - reading PCM audio directly from disk. Almost works, but downsampling from non-mono to mono seems to be broken.
Originally committed to SVN as r1528.
2007-08-22 20:58:53 +00:00