Commit graph

3011 commits

Author SHA1 Message Date
Niels Martin Hansen 58ec137621 Simplify code to pick mapping size in PCMWAV provider, just use sizeof(void*) to determine address space size.
Originally committed to SVN as r2830.
2009-04-18 15:16:15 +00:00
Niels Martin Hansen 5a50efac9f Move more project settings into property sheet files.
Originally committed to SVN as r2829.
2009-04-18 13:40:52 +00:00
Niels Martin Hansen 30422e5ca8 Rename auto3 DLL to something less ugly.
Originally committed to SVN as r2828.
2009-04-18 13:31:08 +00:00
Karl Blomster 254a7ae359 revert revision 2825 since apparently it broke all of jfs' changes
Originally committed to SVN as r2827.
2009-04-18 13:02:13 +00:00
Karl Blomster c806ba8d72 "Fix" an issue that would cause the FFMS2 audio provider to crash when fed with a unicode filename/path. The solution involves getting the "short path", no idea if it works on Unix. Fixes bugtracker issues #810 and #808.
Originally committed to SVN as r2826.
2009-04-18 10:54:20 +00:00
Karl Blomster 3e70c0af81 add portaudio_x86.dll to the list of delay-loaded dll's in the vs2008 project file
Originally committed to SVN as r2825.
2009-04-18 09:37:54 +00:00
Karl Blomster f12a3a8af7 Fix an issue where the grid font face option's font browser button wouldn't actually update the setting. Patch by Harukalover, resolves bugtracker issues #706 and (partially) #821.
Originally committed to SVN as r2824.
2009-04-18 09:12:26 +00:00
Niels Martin Hansen 4787a2fcdb Visual Studio loves not saving property sheets unless told to VERY explicitly. Missed one for Lua 5.0.
Originally committed to SVN as r2823.
2009-04-17 22:39:43 +00:00
Niels Martin Hansen ffde7daec5 Adjust hunspell VC project to also use property sheets.
Originally committed to SVN as r2822.
2009-04-17 22:34:03 +00:00
Niels Martin Hansen 4fc3b7faf0 No longer support anything for Windows-builds but Visual Studio 2008/VC9.
Remove all outdated, unmaintained project files and some unused dirs, and other stuff related to outdated build methods.

Originally committed to SVN as r2821.
2009-04-17 22:08:37 +00:00
Niels Martin Hansen af538651ef Some changes to property sheets went unsaved before previous commit, oops.
(This made linking in various things impossible.)

Originally committed to SVN as r2820.
2009-04-17 21:58:17 +00:00
Niels Martin Hansen 2c392407c4 Refactor Visual Studio 2008 build and make libauto3 and Lua 5.0 build on VC9.
* The most important project properties (especially paths) are now stored in VSProps files in generalised ways.
* Projects share VSProps files so they place output files in same locations and thus agree on where to find them.
* Avoid inconsistencies between build configurations/platforms as has happened often before.
* Now distributable binaries (aegisub.exe and aegisub-auto3.dll) will be placed in $(SolutionDir)/bin/, static libraries under $(SolutionDir)/lib/ and object files etc. under $(SolutionDir)/build/. Note that those locations are controlled by where the solution file is placed in the file system.
* libauto3 is no longer pulled in by a #pragma in auto4_auto3.c, but must instead be pulled in by making the aegisub project depend on the auto3 project, which must in turn depend on the lua50 project.
* Final binary filenames are now somewhat different. You get aegisub32.exe, aegisub64d.exe, aegisub-auto3lib32d.dll and more.
* There's still more that can be factored out, things like optimisation flags and defines.

Originally committed to SVN as r2819.
2009-04-17 21:53:48 +00:00
Niels Martin Hansen 6d1207900b The lines.n value produced by Auto3 implementation was 1 too small causing the last line in a file to be eaten by karaskel.
Originally committed to SVN as r2818.
2009-04-17 21:34:43 +00:00
Niels Martin Hansen a3600f8ca1 Make callables.c error properly if it's attempted compiled separately.
Originally committed to SVN as r2817.
2009-04-17 20:55:48 +00:00
Niels Martin Hansen 2d64f5079f Make libauto3 better liked by MSVC 2008.
Originally committed to SVN as r2816.
2009-04-17 20:51:58 +00:00
Niels Martin Hansen e977f3c991 Force use of ANSI versions of Windows API's for runtime+loading of DLL's, causing problems when building with UNICODE defined.
Originally committed to SVN as r2815.
2009-04-17 20:20:37 +00:00
Karl Blomster 59eb07c79f add portaudio2 player to the vs2005 project as well while I'm at it
Originally committed to SVN as r2814.
2009-04-17 19:45:33 +00:00
Karl Blomster 80ce8e7508 add portaudio2 audio player to config/config_windows0.h and the vs2008 project file
Originally committed to SVN as r2813.
2009-04-17 19:44:07 +00:00
Karl Blomster 6a69da3331 change buffer length/wanted latency in the dsound2 audio player to 80/4 (down from 100/5); should make it a bit more responsive
Originally committed to SVN as r2812.
2009-04-17 19:40:29 +00:00
Karl Blomster 13c59b5af0 update ffms2.lib
Originally committed to SVN as r2811.
2009-04-17 19:38:12 +00:00
Niels Martin Hansen 19b5544a2a Fix crash in PCM audio provider when using files larger than the mapping size (256 MB on 32 bit). The length of mappings closer than mapping-size to the end of the file, when the file was larger, would not be adjusted to not cross the end of file.
Originally committed to SVN as r2810.
2009-04-17 16:34:06 +00:00
Amar Takhar 28470e309d Re-order the functions so they're in line with every other player: Constructor,
Destructor, Open, Close, Play, Stop..  I rue the fact that I didn't do this at
the start.

Originally committed to SVN as r2809.
2009-04-17 13:58:44 +00:00
Karl Blomster 0ad0b6d5c9 Fix a bug in FFMS2 that caused it to write timecodes with scientific notation.
Originally committed to SVN as r2808.
2009-04-17 03:25:10 +00:00
Amar Takhar 235af35603 * Remove a short-lived hack (hours?) and replace it with a
PaStreamFinishedCallback which is called anytime a PaCallback is exited with
  anything other than 0. (normal operation)  paStreamFinishedCallback handles
  stopping the audio stream when we've run to the end of the current selection
  or the stream is stopped.
* Add framesPerBuffer to paCallback debug output in preperation for dynamic
  buffers.
* Set paPrimeOutputBuffersUsingStreamCallback in Pa_OpenStream to prime the
  output buffer using the callback rather than initing with empty space which
  is the default.
* Indent paCallback decleration another level.

Originally committed to SVN as r2807.
2009-04-17 02:14:42 +00:00
Amar Takhar a3f9735d38 * Fold entire callback into a single if-else block.
* Remove 'end' variable and just return 0 if we have more to play.

Originally committed to SVN as r2806.
2009-04-16 20:55:14 +00:00
Amar Takhar 0d7af5f333 * Remove variable 'avail'.
* Fold lenAvailable logic into a ternary operator.
* Use GetAduioWithVolume instead of applying volume ourselves.
* Remove code used to zero rest of the buffer. (not required)

Originally committed to SVN as r2805.
2009-04-16 20:49:37 +00:00
Amar Takhar 89fa60082e * Set Pa_OpenStream to use paClipOff as we don't need any clipping
* Update comment (realPlayPos has been removed).
* Return from paCallback with paAbort if there is no more audio to play.
  Also set endPos to be less than the current playPos to stop the audio
  event timer.
* Add CPU usage statistics to debug printf in paCallback.

Originally committed to SVN as r2804.
2009-04-16 19:55:52 +00:00
Amar Takhar eebde56363 Make debug printf's a perm fixture wrapped with PORTAUDIO2_DEBUG.
Originally committed to SVN as r2803.
2009-04-16 14:22:46 +00:00
Niels Martin Hansen bcc8cede88 Forgot to put license on VideoSink.h as well.
Originally committed to SVN as r2802.
2009-04-16 13:01:05 +00:00
Niels Martin Hansen 103c407a64 Clarify license for VideoSink.cpp.
<jfs> hmm Haali, the VideoSink.cpp you have contributed to aegisub doesn't have a license attached... I see you put MatroskaParser.c into 3-clause BSD like the rest of aegisub though, what about VideoSink ?
<Haali> jfs: BSD license is ok for that file

Originally committed to SVN as r2801.
2009-04-16 12:15:57 +00:00
Amar Takhar fd16c4ff13 Move the comment for the PortAudio library to setup.cpp.
Requested by: TheFluff

Originally committed to SVN as r2800.
2009-04-15 20:16:54 +00:00
Amar Takhar d689a486c0 Don't initalise favorite to 0 (it's a a wxString).
Originally committed to SVN as r2799.
2009-04-15 20:11:53 +00:00
Amar Takhar 96a33b1331 Don't set the current position via the PortAudio callback, instead set
GetCurrentPosition() to return the correct value using Pa_GetStreamTime().  Not
only does it not work on every platform, there is no point in setting it during
the callback as GetCurrentPosition() isn't called very often (in comparison)
when updating the play bar.  Eventually this should be changed to update the
playbar via a callback to get a position that's a lot more accurate.

Originally committed to SVN as r2798.
2009-04-15 17:50:16 +00:00
Amar Takhar 218c9877ac Add hidden option 'Audio PortAudio Device' to set the default portaudio output device.
Originally committed to SVN as r2797.
2009-04-15 11:26:43 +00:00
Amar Takhar af84de21ab * Fix paCallback decleration
* Switch from PaOpenDefaultStream to Pa_OpenStream.
* Add Debug output
* Add GetOutputDevices which returns a list of available devices (unused)

Originally committed to SVN as r2796.
2009-04-15 10:26:22 +00:00
Niels Martin Hansen 50679014ea Make the default ALSA device default.
(It should be "default", not "default:0" as the old default was.)

Originally committed to SVN as r2795.
2009-04-13 17:08:13 +00:00
Amar Takhar e6a09d383c Move FOUND_AUDIO_PLAYER above the rest of the audio players to preserve
link ordering.  Also add libaudio_player.a to the final link.

Originally committed to SVN as r2794.
2009-04-12 10:52:40 +00:00
Amar Takhar 41034545e7 Early morning code-o, setting AM_CONDITIONAL _after_ the Makefiles are
generated isn't going to work very well.

Originally committed to SVN as r2793.
2009-04-12 10:48:20 +00:00
Amar Takhar 55afc7c29a * Update comment
* Include audio_player_portaudio2.h instead of audio_player_portaudio.h.

Originally committed to SVN as r2792.
2009-04-12 10:30:38 +00:00
Amar Takhar fb4d7e67e2 Split audio_player.cpp into it's own convenience to avoid sending audio library
CFLAGS to every source file.

Originally committed to SVN as r2791.
2009-04-12 10:30:07 +00:00
Amar Takhar 11c341030b Add support for ALSA_(LD|C)FLAGS.
Originally committed to SVN as r2790.
2009-04-12 10:28:42 +00:00
Amar Takhar f6d8cca7aa Add block for WITH_PORTAUDIO2.
Originally committed to SVN as r2789.
2009-04-12 10:08:59 +00:00
Amar Takhar 72bfc9862a * s/$found_audio/$found_audio_player/ for clarity.
* Add AM_CONDITIONAL for FOUND_AUDIO_PLAYER and FOUND_VIDEO_PROVIDER.

Originally committed to SVN as r2788.
2009-04-12 10:08:28 +00:00
Amar Takhar c674034054 Update PortAudio v19 support.
Originally committed to SVN as r2787.
2009-04-12 10:04:10 +00:00
Amar Takhar 2c3e71b098 Move the PortAudio v19 check above the v18 check.
Originally committed to SVN as r2786.
2009-04-11 23:40:15 +00:00
Amar Takhar 7ecdd1035a Add 'PortAudio2' as an audio player.
Originally committed to SVN as r2785.
2009-04-11 23:23:30 +00:00
Amar Takhar ebdeeec267 Change WITH_PORTAUDIO -> WITH_PORTAUDIO2
Originally committed to SVN as r2784.
2009-04-11 23:18:04 +00:00
Amar Takhar 907484a602 Update audio_player_portaudio2.* for PortAudio v19.
Originally committed to SVN as r2783.
2009-04-11 23:16:58 +00:00
Amar Takhar c12f35f9c6 Verbatium copy of audio_player_portaudio.* -> audio_player_portaudio2.*
Originally committed to SVN as r2782.
2009-04-11 23:15:45 +00:00
Fredrik Mellbin 6ca864b88c FFMS2 GCC compilation fix
Originally committed to SVN as r2781.
2009-04-11 19:43:18 +00:00