forked from mia/Aegisub
Wrap docs in audio_controller.h at 80 columns rather than 100
Originally committed to SVN as r5069.
This commit is contained in:
parent
f3d1bc23bd
commit
ca8b6d8525
1 changed files with 37 additions and 30 deletions
|
@ -128,22 +128,25 @@ public:
|
||||||
/// @class AudioController
|
/// @class AudioController
|
||||||
/// @brief Manage an open audio stream and UI state for it
|
/// @brief Manage an open audio stream and UI state for it
|
||||||
///
|
///
|
||||||
/// Keeps track of the UI interaction state of the open audio for a project, ie. what the current
|
/// Keeps track of the UI interaction state of the open audio for a project,
|
||||||
/// selection is, what movable markers are on the audio, and any secondary non-movable markers
|
/// i.e. what the current selection is, what movable markers are on the audio,
|
||||||
/// that are present.
|
/// and any secondary non-movable markers that are present.
|
||||||
///
|
///
|
||||||
/// Changes in interaction are broadcast to all managed audio displays so they can redraw, and
|
/// Changes in interaction are broadcast to all managed audio displays so they
|
||||||
/// the audio displays report all interactions back to the controller. There is a one to many
|
/// can redraw, and the audio displays report all interactions back to the
|
||||||
/// relationship between controller and audio displays. There is at most one audio controller
|
/// controller. There is a one to many relationship between controller and
|
||||||
/// for an open subtitling project.
|
/// audio displays. There is at most one audio controller for an open
|
||||||
|
/// subtitling project.
|
||||||
///
|
///
|
||||||
/// Creates and destroys audio providers and players. This behaviour should at some point be moved
|
/// Creates and destroys audio providers and players. This behaviour should at
|
||||||
/// to a separate class, as it adds too many responsibilities to this class, but at the time of
|
/// some point be moved to a separate class, as it adds too many
|
||||||
/// writing, it would extend the scope of reworking components too much.
|
/// responsibilities to this class, but at the time of writing, it would extend
|
||||||
|
/// the scope of reworking components too much.
|
||||||
///
|
///
|
||||||
/// There is not supposed to be a way to get direct access to the audio providers or players owned
|
/// There is not supposed to be a way to get direct access to the audio
|
||||||
/// by a controller. If some operation that isn't possible in the existing design is needed, the
|
/// providers or players owned by a controller. If some operation that isn't
|
||||||
/// controller should be extended in some way to allow it.
|
/// possible in the existing design is needed, the controller should be
|
||||||
|
/// extended in some way to allow it.
|
||||||
class AudioController : public wxEvtHandler, public AudioMarkerProvider {
|
class AudioController : public wxEvtHandler, public AudioMarkerProvider {
|
||||||
private:
|
private:
|
||||||
/// A new audio stream was opened (and any previously open was closed)
|
/// A new audio stream was opened (and any previously open was closed)
|
||||||
|
@ -235,29 +238,31 @@ public:
|
||||||
/// @brief Get the URL for the current open audio stream
|
/// @brief Get the URL for the current open audio stream
|
||||||
/// @return The URL for the audio stream
|
/// @return The URL for the audio stream
|
||||||
///
|
///
|
||||||
/// The returned URL can be passed into OpenAudio() later to open the same stream again.
|
/// The returned URL can be passed into OpenAudio() later to open the same
|
||||||
|
/// stream again.
|
||||||
wxString GetAudioURL() const;
|
wxString GetAudioURL() const;
|
||||||
|
|
||||||
|
|
||||||
/// @brief Start or restart audio playback, playing a range
|
/// @brief Start or restart audio playback, playing a range
|
||||||
/// @param range The range of audio to play back
|
/// @param range The range of audio to play back
|
||||||
///
|
///
|
||||||
/// The end of the played back range may be requested changed, but is not changed
|
/// The end of the played back range may be requested changed, but is not
|
||||||
/// automatically from any other operations.
|
/// changed automatically from any other operations.
|
||||||
void PlayRange(const SampleRange &range);
|
void PlayRange(const SampleRange &range);
|
||||||
|
|
||||||
/// @brief Start or restart audio playback, playing the primary playback range
|
/// @brief Start or restart audio playback, playing the primary playback range
|
||||||
///
|
///
|
||||||
/// If the primary playback range is updated during playback, the end of the
|
/// If the primary playback range is updated during playback, the end of
|
||||||
/// active playback range will be updated to match the new selection. The playback
|
/// the active playback range will be updated to match the new selection.
|
||||||
/// end can not be changed in any other way.
|
/// The playback end can not be changed in any other way.
|
||||||
void PlayPrimaryRange();
|
void PlayPrimaryRange();
|
||||||
|
|
||||||
/// @brief Start or restart audio playback, playing from a point to the end of stream
|
/// @brief Start or restart audio playback, playing from a point to the end of stream
|
||||||
/// @param start_sample Index of the sample to start playback at
|
/// @param start_sample Index of the sample to start playback at
|
||||||
///
|
///
|
||||||
/// Playback to end cannot be converted to a range playback like range playback can,
|
/// Playback to end cannot be converted to a range playback like range
|
||||||
/// it will continue until the end is reached, it is stopped, or restarted.
|
/// playback can, it will continue until the end is reached, it is stopped,
|
||||||
|
/// or restarted.
|
||||||
void PlayToEnd(int64_t start_sample);
|
void PlayToEnd(int64_t start_sample);
|
||||||
|
|
||||||
/// @brief Stop all audio playback
|
/// @brief Stop all audio playback
|
||||||
|
@ -276,9 +281,9 @@ public:
|
||||||
/// @brief If playing, restart playback from the specified position
|
/// @brief If playing, restart playback from the specified position
|
||||||
/// @param new_position Sample index to restart playback from
|
/// @param new_position Sample index to restart playback from
|
||||||
///
|
///
|
||||||
/// This function can be used to re-synchronise audio playback to another source that
|
/// This function can be used to re-synchronise audio playback to another
|
||||||
/// might not be able to keep up with the full speed, such as video playback in high
|
/// source that might not be able to keep up with the full speed, such as
|
||||||
/// resolution or with complex subtitles.
|
/// video playback in high resolution or with complex subtitles.
|
||||||
///
|
///
|
||||||
/// This function only does something if audio is already playing.
|
/// This function only does something if audio is already playing.
|
||||||
void ResyncPlaybackPosition(int64_t new_position);
|
void ResyncPlaybackPosition(int64_t new_position);
|
||||||
|
@ -313,9 +318,10 @@ public:
|
||||||
AudioTimingController * GetTimingController() const { return timing_controller.get(); }
|
AudioTimingController * GetTimingController() const { return timing_controller.get(); }
|
||||||
|
|
||||||
/// @brief Change the current timing controller
|
/// @brief Change the current timing controller
|
||||||
/// @param new_mode The new timing controller or 0. This may be the same object as
|
/// @param new_mode The new timing controller or 0. This may be the same
|
||||||
/// the current timing controller, to signal that the timing controller has changed
|
/// object as the current timing controller, to signal that the timing
|
||||||
/// the object being timed, eg. changed to a new dialogue line.
|
/// controller has changed the object being timed, e.g. changed to a new
|
||||||
|
/// dialogue line.
|
||||||
void SetTimingController(AudioTimingController *new_controller);
|
void SetTimingController(AudioTimingController *new_controller);
|
||||||
|
|
||||||
/// @brief Convert a count of audio samples to a time in milliseconds
|
/// @brief Convert a count of audio samples to a time in milliseconds
|
||||||
|
@ -364,9 +370,10 @@ public:
|
||||||
/// @brief Retrieve whether this marker participates in snapping
|
/// @brief Retrieve whether this marker participates in snapping
|
||||||
/// @return True if this marker may snap to other snappable markers
|
/// @return True if this marker may snap to other snappable markers
|
||||||
///
|
///
|
||||||
/// If a marker being dragged returns true from this method, and another marker which also
|
/// If a marker being dragged returns true from this method, and another
|
||||||
/// returns true from this method is within range, the marker being dragged will be positioned
|
/// marker which also returns true from this method is within range, the
|
||||||
/// at the position of the other marker if it is released while it is inside snapping range.
|
/// marker being dragged will be positioned at the position of the other
|
||||||
|
/// marker if it is released while it is inside snapping range.
|
||||||
virtual bool CanSnap() const = 0;
|
virtual bool CanSnap() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue