Commit Graph

31 Commits

Author SHA1 Message Date
Thomas Goyne 6fad60e58d Use NSDMIs where applicable 2013-12-11 18:50:12 -08:00
Thomas Goyne 04435a13a3 Remove some unused AudioPlayer methods 2013-09-26 20:31:20 -07:00
Thomas Goyne 1e0f08c0ed Mostly purge wxWidgets from non-UI stuff
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.

Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.

Move the path token management logic to libaegisub (and rewrite it in
the process).

Add a basic thread pool based on asio and std::thread to libaegisub.

This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne a99428c49d Extract options and MRU stuff from main.h
Nearly all of the files including main.h are doing so only for OPT_GET
and friends, which are rather unrelated to the main things that main.h
declares.
2013-01-09 16:48:31 -08:00
Thomas Goyne d0f4d9df99 Replace all uses of lagi_wxString with to_wx 2012-12-22 15:18:38 -08:00
Thomas Goyne 96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne 06aaaff16b NULL -> nullptr 2012-11-13 08:51:01 -08:00
Thomas Goyne e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne 95a1b7e9b5 Remove AudioPlayer::OpenStream and CloseStream
Instead, just pass the provider to the constructor and let the player
worry about when to create its things. The ability to explicitly open
and close the playback wasn't actually required for anything, and it
complicated the implementations of the players.
2012-10-12 14:51:29 -07:00
Thomas Goyne 7218c04d52 Kill AudioPlayer::displayTimer
The rewritten audio display does not use displayTimer and that
functionality shouldn't have been in the players in the first place.

Originally committed to SVN as r6605.
2012-03-25 04:05:44 +00:00
Thomas Goyne 2e37ba8246 Remove redundant OSS device option
Originally committed to SVN as r6341.
2012-01-23 19:02:05 +00:00
Thomas Goyne 81a99ae27b Remove pointless duplicated member variable in OSSPlayer and document a few of the members
Originally committed to SVN as r6225.
2012-01-08 01:33:55 +00:00
Thomas Goyne df9c6b627f Improve audio open error reporting and remove a pile of unused stuff in AudioPlayer
Originally committed to SVN as r6223.
2012-01-08 01:33:39 +00:00
Thomas Goyne cae10121ed Fix a bunch of -pedantic stuff
Originally committed to SVN as r6181.
2011-12-28 21:27:06 +00:00
Thomas Goyne e5e159d6b1 Throw agi::Exception derived exceptions from the OSS player rather than bare strings
Originally committed to SVN as r5916.
2011-11-25 19:30:42 +00:00
Thomas Goyne d990bbbb99 Eliminate all unnecessary uses of L and _T
Originally committed to SVN as r5611.
2011-09-28 19:43:11 +00:00
Amar Takhar efe88823c7 Add missing header.
Originally committed to SVN as r5091.
2011-01-02 02:37:05 +00:00
Thomas Goyne 833e69b09f Replace MIN/MAX/MID with std::min/std::max/mid
Originally committed to SVN as r5078.
2010-12-31 21:03:03 +00:00
Thomas Goyne 3345797ff6 Use signals in AudioController and AudioTimingController
Originally committed to SVN as r4907.
2010-12-08 08:09:16 +00:00
Amar Takhar c15777f844 Merge audio_display_rewrite branch to trunk. This is not a complete work, don't expect to time anything for a while.
Originally committed to SVN as r4903.
2010-12-08 03:36:10 +00:00
Thomas Goyne c10e9e3a5b Make video and audio providers throw typed exceptions.
Don't display error messages and try other providers when the user
cancels loading a file.

Remove files from the MRU lists if they can't be found.

Closes #717.

Originally committed to SVN as r4717.
2010-08-02 06:32:01 +00:00
Thomas Goyne 71fb04cd29 Rework most of the various factories to not need an explicit helper class for each class constructable via a factory.
Originally committed to SVN as r4716.
2010-08-02 06:31:38 +00:00
Thomas Goyne 4a8abae3a3 Kill options.h and options.cpp, which have been empty for a while
Originally committed to SVN as r4676.
2010-07-12 21:49:48 +00:00
Amar Takhar 931cc7f461 * Remove all instances of wxLogDebug and replace them with LOG_W, LOG_D, LOG_E and LOG_D_IF as required.
* Add LOG_(D|W|I)_IF for conditional logging.

Originally committed to SVN as r4465.
2010-06-08 23:21:39 +00:00
Amar Takhar 40e12403d5 Merge all changes from the libaegisub branch into trunk, the effective range is r4175:4330. All options have been re-done and now use Cajun to support a json-backed format.
Initial support for low-level access and file I/O methods are included as well.

Originally committed to SVN as r4331.
2010-05-21 01:13:36 +00:00
Grigori Goronzy 5db8abd330 OSS player: convert device name to UTF-8 string.
Originally committed to SVN as r4071.
2010-01-30 15:08:50 +00:00
Amar Takhar d348b4e33e Fix all the headers in *.cpp, this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
 * Sorting alphabetically.

Originally committed to SVN as r3515.
2009-09-10 13:06:40 +00:00
Amar Takhar 7a8c5229fd * Remove wxprec.h from all files other than agi_pre.h. Including this in various headers is useless as it includes wx.h which includes dozens of 'common' wx headers. With this we're unable to tell which files rely on which interfaces. This commit removes them and manually places in required headers as-needed.
* Update agi_pre.h to include some missing headers, also move required windowsheaders to the top of the list
 * Use <> versus "" for the wx header in avisynth_wrap.cpp
 * Remove xx/wx.h from agi_pre.h as it's included by wxprec.h.

Originally committed to SVN as r3513.
2009-09-10 10:26:50 +00:00
Amar Takhar d519f4589d * Remove main.h from files that don't require it.
* Remove include guard in main.h as it's no longer required.
 * Sort wx headers and wrap with #ifndef WX_PRE.
 * Add #define WX_PRE to stdwx.h.

Originally committed to SVN as r3502.
2009-09-10 02:07:55 +00:00
Grigori Goronzy 5ab1eab906 OSS player: handle changing end position correctly
If the slider is moved to the playbar while the player is running,
the playback needs to be stopped.  Handle this situation properly.

Additionally, select a low-latency buffer policy if possible (OSS4
only).  This will make it possible to move the slide near the playbar
without stopping playback (the current writing position is always in
advance of the playback position by the buffer size!)

Originally committed to SVN as r3498.
2009-09-09 03:24:34 +00:00
Grigori Goronzy 9d0daf6821 Add OSS audio player
Tested on OSS4 (4front), FreeBSD 7.2 OSS and with ALSA's OSS emulation.
Bear with me, this is both my first serious C++ and OSS code.

Originally committed to SVN as r3497.
2009-09-08 22:06:07 +00:00