Commit Graph

24 Commits

Author SHA1 Message Date
Niels Martin Hansen b1c39b5698 Set cbSize in WAVEFORMATEX correctly, even though it's supposed to be ignored for PCM format, and don't include the unused flag for notification-event support in the buffer creation flags.
Originally committed to SVN as r1604.
2007-10-18 02:27:55 +00:00
Niels Martin Hansen 509732b0c2 Fix #580 - DSound playback stops before end of selection. Only happened with selections longer than 150 ms and up to 150*BytesPerSample ms, that is, 300 ms for the most common 16 bit audio. The condition used to test whether streaming or one-shot mode should be used didn't take sampledepth into account and compared a number of samples with a buffer length in bytes.
Originally committed to SVN as r1602.
2007-10-18 00:33:07 +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 aff3548407 Should fix #521 - no more "can not wait for thread termination" / "couldn't terminate thread" errors.
Originally committed to SVN as r1491.
2007-08-15 19:40:41 +00:00
Niels Martin Hansen 0718cf5a2c Hack: Use a single-play (non-looping) buffer for very short samples that fit entirely in the buffer for DSound playback. This avoids unwanted repeating of very short samples, but also makes it impossible to extend these selections to continue playback.
Fixing the real problem could prove to be very hard or even impossible, as it seems to be a problem of timing and possibly even related to the time slices allocated by the OS. As a buffer size in the DSound player is fixed at 150 ms the side-effect of this hack hopefully won't be a real problem.

Originally committed to SVN as r1460.
2007-07-29 21:00:57 +00:00
Niels Martin Hansen 9ab2d1c7fe Seems to fix DSound player repeat-at-end problem.
Also avoid throwing-catching an exception during audio display drawing, only because it looks bad in the debug output.

Originally committed to SVN as r1449.
2007-07-28 13:59:32 +00:00
Niels Martin Hansen cbec57facf "Maybe" fix for #470 - reset the playback start time and audio area start when seeking. This should make the times returned correct.
Originally committed to SVN as r1394.
2007-07-08 13:49:51 +00:00
Niels Martin Hansen 02a53226ab "Fix" #471, shortened the buffer down to 250 ms (instead of 1500 ms) and tightened the loop filling it to run every 100 ms instead of every 500. Result is that it's almost impossible to reproduce the problem now. (It pretty much takes superhuman reflexes.)
Originally committed to SVN as r1393.
2007-07-08 13:28:15 +00:00
Niels Martin Hansen b9298b61e4 FIXME comments in (almost) all audio players, neither handle time reporting fully correct: they report number of samples they have played plus start sample, instead of current sample being heard, ie. they don't take into account that the current position might get changed in mid-stream by the video player to resync audio to video.
Originally committed to SVN as r1175.
2007-05-10 22:39:17 +00:00
Niels Martin Hansen 4d0a78b9a9 DSound player seems good now... stop breaking it.
Originally committed to SVN as r1129.
2007-04-25 00:35:10 +00:00
Niels Martin Hansen ba944fd9b2 REALLY fixed DSound playback this time.
Originally committed to SVN as r1113.
2007-04-22 16:03:28 +00:00
Rodrigo Braz Monteiro b2f2cf2d7f Changed the audio player interface to use pluggable factories and added audio player/provider to options (in a new page, where all advanced audio options were moved to)
Originally committed to SVN as r1107.
2007-04-22 01:23:25 +00:00
Rodrigo Braz Monteiro be0cedb475 Made esc work with attachments, automation and spell checker dialogs, and jfs's suggested changes to dsound code
Originally committed to SVN as r1105.
2007-04-22 00:14:58 +00:00
Niels Martin Hansen 168d08acc2 Fixed compiler warning and removed some dead code.
Originally committed to SVN as r1101.
2007-04-20 21:15:21 +00:00
Niels Martin Hansen c1cb6e4367 Stable, correct and uncut audio playback GET!
Originally committed to SVN as r1100.
2007-04-20 18:07:44 +00:00
Niels Martin Hansen 4276b02f89 Fixed #320, other applications no longer interfere with audio playback. Apparently those notifications for DSound buffers aren't reliable at all.
Still one minor problem with audio display cursor making a strange jump about one second from end of selection, this doesn't seem to affect playback though.

Originally committed to SVN as r1099.
2007-04-20 16:27:18 +00:00
Niels Martin Hansen 813a487b23 Rewrote lots of the DirectSound audio code, hopefully it's more stable now.
Originally committed to SVN as r1098.
2007-04-19 23:38:54 +00:00
Rodrigo Braz Monteiro 297dbd74b8 Fixed almost a hundred warning messages issued with /W4 in VC++ (with warning 4100 disabled)
Originally committed to SVN as r891.
2007-01-24 03:54:32 +00:00
Rodrigo Braz Monteiro b4d1384c6d Fixes to bugs #275 and #276, related to audio display.
Originally committed to SVN as r794.
2007-01-15 03:50:49 +00:00
Niels Martin Hansen a88feab986 More fixes for dsound playing code and a bit for spectrum rendering
Originally committed to SVN as r732.
2007-01-07 04:52:33 +00:00
Niels Martin Hansen d0a7745d41 Fixed uninited variable causing exception
Originally committed to SVN as r730.
2007-01-07 03:19:48 +00:00
Rodrigo Braz Monteiro b3f2f069d3 Fixed and completed the implementation of DirectSound audio player, and made some changes for future ASS2 support.
Originally committed to SVN as r716.
2007-01-05 18:27:15 +00:00
Rodrigo Braz Monteiro 06cff2e2f2 Renamed /core/ to /aegisub/ to avoid issues with unix systems being unable to delete core dumps.
Originally committed to SVN as r652.
2006-12-28 23:43:23 +00:00