[Scummvm-cvs-logs] SF.net SVN: scummvm:[49554] scummvm/branches/gsoc2010-opengl/backends/ audiocd/abstract-audiocd.h

vgvgf at users.sourceforge.net vgvgf at users.sourceforge.net
Thu Jun 10 04:08:08 CEST 2010


Revision: 49554
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49554&view=rev
Author:   vgvgf
Date:     2010-06-10 02:08:08 +0000 (Thu, 10 Jun 2010)

Log Message:
-----------
Commented AudioCDManager

Modified Paths:
--------------
    scummvm/branches/gsoc2010-opengl/backends/audiocd/abstract-audiocd.h

Modified: scummvm/branches/gsoc2010-opengl/backends/audiocd/abstract-audiocd.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/audiocd/abstract-audiocd.h	2010-06-09 21:41:20 UTC (rev 49553)
+++ scummvm/branches/gsoc2010-opengl/backends/audiocd/abstract-audiocd.h	2010-06-10 02:08:08 UTC (rev 49554)
@@ -28,10 +28,15 @@
 
 #include "common/noncopyable.h"
 
+/**
+* Abstract Audio CD manager class. Private subclasses implement the actual
+* functionality.
+*/
 class AudioCDManager : Common::NonCopyable {
 public:
 	virtual ~AudioCDManager() {}
 
+
 	struct Status {
 		bool playing;
 		int track;
@@ -40,19 +45,88 @@
 		int numLoops;
 	};
 
-	// Emulated CD functions, engines should call these functions
+	/**
+	 * @name Emulated playback functions
+	 * Engines should call these functions. Not all platforms
+	 * support cd playback, and these functions should try to
+	 * emulate it.
+	 */
+	//@{
+
+	/**
+	 * Start audio CD playback
+	 * @param track			the track to play.
+	 * @param num_loops		how often playback should be repeated (-1 = infinitely often).
+	 * @param start_frame	the frame at which playback should start (75 frames = 1 second).
+	 * @param duration		the number of frames to play.
+	 * @param only_emulate	determines if the track should be emulated only
+	 */
 	virtual void play(int track, int numLoops, int startFrame, int duration, bool only_emulate = false) = 0;
+
+	/**
+	 * Get if audio is being played.
+	 * @return true if CD or emulated audio is playing
+	 */
+	virtual bool isPlaying() const = 0;
+
+	/**
+	 * Stop CD or emulated audio playback.
+	 */
 	virtual void stop() = 0;
-	virtual bool isPlaying() const = 0;
+
+	/**
+	 * Update CD or emulated audio status.
+	 */
 	virtual void update() = 0;
+
+	/**
+	 * Get the playback status.
+	 * @return a Status struct with playback data.
+	 */
 	virtual Status getStatus() const = 0;
 
-	// Real CD functions. Let Subclasses implement the real code
-	virtual bool openCD(int drive) { return false; }
-	virtual void updateCD() {}
-	virtual bool pollCD() const { return false; }
-	virtual void playCD(int track, int num_loops, int start_frame, int duration) {}
-	virtual void stopCD() {}
+	//@}
+
+
+	/**
+	 * @name Real CD audio methods
+	 * These functions should be called from the emulated
+	 * ones if they can't emulate the audio playback.
+	 */
+	//@{
+
+	/**
+	 * Initialise the specified CD drive for audio playback.
+	 * @return true if the CD drive was inited succesfully
+	 */
+	virtual bool openCD(int drive) = 0;
+	
+	/**
+	 * Poll CD status.
+	 * @return true if CD audio is playing
+	 */
+	virtual bool pollCD() const = 0;
+
+	/**
+	 * Start CD audio playback.
+	 * @param track			the track to play.
+	 * @param num_loops		how often playback should be repeated (-1 = infinitely often).
+	 * @param start_frame	the frame at which playback should start (75 frames = 1 second).
+	 * @param duration		the number of frames to play.
+	 */
+	virtual void playCD(int track, int num_loops, int start_frame, int duration) = 0;
+
+	/**
+	 * Stop CD audio playback.
+	 */
+	virtual void stopCD() = 0;
+
+	/**
+	 * Update CD audio status.
+	 */
+	virtual void updateCD() = 0;
+
+	//@}
 };
 
 #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list