Commit Graph

25 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 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 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 f2aadc7439 Add automatic host API selection to the portaudio player
Portaudio defaults to using the most stable widely available host API,
rather than the highest performance or quality, and as a result the
default host API on windows (MME) is really quite bad. As such, add
logic to select the best host API for the selected output device.

Closes #1375.

Originally committed to SVN as r6346.
2012-01-23 21:14:32 +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 4990d8255c Don't bother refcounting portaudio initializations as portaudio does that internally
Originally committed to SVN as r6206.
2012-01-08 01:04:44 +00:00
Thomas Goyne 87496b8767 Finish rewriting the PortAudio player
Remove pointless volatiles.

Throw agi::Exception-derived exceptions rather than bare strings.

Eliminate pointless struct which wrapped a few member variables for no
apparent reason.

Use logging statements rather than printf.

Don't set an explicit frame buffer size as the audio providers are fine
with variable sizes and portaudio strongly recommends leaving it up to
the device to decide.

Closes #997.

Originally committed to SVN as r5918.
2011-11-28 20:01:46 +00:00
Thomas Goyne caf81157f1 Fix portaudio player compilation
Originally committed to SVN as r4719.
2010-08-02 08:03:58 +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
Amar Takhar 774fb0f674 Fix all the headers in *., this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
  * Sorting alphabetically.
  * Same operation as r3515.

Note: This is broken when precompiled headers are not in use, I'll fix that after this commit so the two changes don't get jumbled up.

Originally committed to SVN as r3525.
2009-09-11 02:36:34 +00:00
Amar Takhar 46c824442b Remove useless typedef
Originally committed to SVN as r3467.
2009-09-02 10:04:03 +00:00
Amar Takhar 28a79d49ac Whoops, I nuked the reference counter initilisation by accident. in r3440.
Originally committed to SVN as r3441.
2009-08-25 05:31:20 +00:00
Amar Takhar 3eff6459cb * Clean up doxygen comments.
* Fix spacing between blocks.
 * Add some debugging info.

Originally committed to SVN as r3440.
2009-08-25 05:17:07 +00:00
Amar Takhar 8ba5aa27be Move stream position info into it's own struct.. Looks like a few globals can't be helped due to how the AudioPlayer class is designed. If I have to use globals I'll atleast make them easier to manage.. Updates #997.
Originally committed to SVN as r3434.
2009-08-21 21:40:18 +00:00
Amar Takhar 5ea99a65e7 Remove unused global 'stopping' and remove unused mutex code. Updates #997.
Originally committed to SVN as r3433.
2009-08-21 20:28:43 +00:00
Amar Takhar 2df6b2fd38 Remove 'playing' global in favour of an IsPlaying function that uses Pa_IsStreamActive(). Updates #997.
Originally committed to SVN as r3432.
2009-08-21 20:08:58 +00:00
Amar Takhar cd8bb7c241 Document PortAudio player, this is broken in doxygen at the moment not sure why..
Originally committed to SVN as r3323.
2009-07-30 02:51:42 +00:00
Amar Takhar 6ee2f98349 Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs.  This isn't the actual document in itself but empty documentation using any old documentation if it was there.

This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.

Some notes:
 * Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
 * Some multiline comments may have been munged into single line comments
 * Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
 * Enum comments can go after the enumeration itself '[value] /// comment'
 * include/aegisub/*.h haven't been converted yet, this will be done in a later commit
 * Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.

See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.

Originally committed to SVN as r3312.
2009-07-29 22:59:22 +00:00
Amar Takhar 12aa34088a Switch all headers to using Doxygen and cleanup contact info
* Swap old email + website address with 'Aegisub Project http://www.aegisub.org/'
 * Set categories for all files (jfs)
 * Add descriptions for each file (jfs)
 * Add $Id$ keyword

Originally committed to SVN as r3310.
2009-07-29 05:43:02 +00:00
Amar Takhar 1b9f38747b Supplant the portaudio player with the portaudio2 player. This still doesn't handle some of the issues that happen on linux, that will be fixed in a later commit, updates #876.
Originally committed to SVN as r3043.
2009-06-10 04:45:57 +00:00
Amar Takhar 91d73ec8ea SVN Transition Step 3/7
1. cd aegisub/
  2. svn mv *cpp *h src/
  3. svn mv Makefile.am MatroskaParser.c auto4_perldata.inc bitmaps boost \
     changelog.txt config gl include libosxutil libresrc md5.c msvc mythes.cxx \
     mythes.hxx res.rc src/
  4. cd ..
  5. svn mv FFmpegSource2/ INSTALL Makefile.am README  acinclude.m4 \
     autogen.sh automation/ bin build configure.in desktop dummy.txt lib \
     libass/ m4macros/ packages/ po/ scripts/ universalchardet/ aegisub/
  6. mkdir -p docs/wiki_convert
  7. svn add docs/wiki_convert
  8. cd docs
  9. svn mv aegisub_convert_docs.pl convert.bat output wiki_convert/

* See r2749 for full description.

Originally committed to SVN as r2752.
2009-03-08 08:30:39 +00:00