#include <Project.h>
Public Member Functions | |
| Project () | |
| Constructor. | |
| ~Project () | |
| Destructor. | |
| bool | AddTrack (Loader *ld, const track_t itrack, wxWindow *patent) |
| Add a new track to the project. | |
| bool | RemoveTrack (const track_t track) |
| Remove a track from the project. | |
| track_t | NumTracks () |
| Number of tracks. | |
| bool | SetMuteTrack (const track_t track, const bool state) |
| Set mute flag of a track. | |
| bool | GetMuteTrack (const track_t track) |
| Get mute flag of a track. | |
| bool | SetVolumeTrack (const track_t track, const track_t channel, const volume_t vol) |
| Set output channel volume of a track. | |
| volume_t | GetVolumeTrack (const track_t track, const track_t channel) |
| Get output channel volume of a track. | |
| bool | SetSelectionTrack (const track_t track, const samples_t start, const samples_t length) |
| Set track selection. | |
| void | GetSelectionTrack (const track_t track, samples_t &start, samples_t &length) |
| Get track selection. | |
| bool | CopySelectionTrack (const track_t track, wxWindow *parent) |
| Copy track selection to clipboard. | |
| bool | CutSelectionTrack (const track_t track, wxWindow *parent) |
| Cut track selection to clipboard. | |
| bool | PasteIntoTrack (const track_t track, wxWindow *parent) |
| Paste clipboard into a track. | |
| samples_t | TrackPeaks (const track_t track) |
| Get number of peaks of a track. | |
| floatsample_t | GetPeak (const track_t track, const samples_t ppos) |
| Get a single peak value of a track. | |
| bool | Changed () const |
| Is the project changed since last store/load/new. | |
| const wxString * | FileName () const |
| Filename of the last project store. | |
| void | New () |
| Create an empty project. | |
| bool | Load (wxFile &file, const wxString filename, Frame *parent) |
| Load project from file. | |
| bool | Store (wxFile &file, const wxString filename) |
| Store project to file. | |
| void | Play () |
| Play the project. | |
| void | Pause () |
| Pause playback. | |
| void | Stop () |
| Stop playback. | |
| void | ZoomIn () |
| Zoom waveform visualization in. | |
| void | ZoomOut () |
| Zoom waveform visualization out. | |
| samples_t | GetCursor () const |
| Get current cursor position. | |
| bool | SetCursor (samples_t pos) |
| Set current cursor position. | |
| samples_t | UpdateCursor () |
| Update the cursor during playback. | |
| bool | RegisterLoader (Loader *(*reg)()) |
| Register a loader object. | |
| int | NumLoaders () const |
| Get number of loaders. | |
| Loader * | GetLoader (const int index) const |
| Get loader object. | |
| bool | RegisterDevice (Device *(*reg)()) |
| Register a device object. | |
| int | NumDevices () const |
| Get number of devices. | |
| Device * | GetDevice (const int index) const |
| Get device object. | |
| void | SetPlayDevice (Device *dev) |
| Set playback device. | |
| format_ex_t | GetPlayFormat () |
| Get current playback format. | |
| bool | Render (Loader *ld, const format_ex_t &fmt, wxWindow *parent) |
| Render project. | |
| wxString | GetWorkDir () |
| Get working directory. | |
| ratio_t | GetInitPeakRatio () |
| Get initial peak ratio. | |
| int | GetDefPlayDevice () |
| Get default playback device. | |
| void | Configure (wxWindow *parent) |
| Open configure dialog. | |
Private Member Functions | |
| bool | check_consistency () |
| Check internal track structures for consistency. | |
| int | loader_refcnt (const Loader *ld) |
| Number of loader references in all tracks. | |
| samples_t | track_length (const track_t track) |
| Get track length. | |
| bool | copy_selection (const track_t track, wxWindow *parent) |
| Copy track selection to clipboard. | |
| void | append_clipboard (const track_t track, samples_t &npos, samples_t &nlen) |
| Append clipboard to track. | |
| void | clean_tracks () |
| Remove all tracks. | |
Private Attributes | |
| wxFile | clipboard |
| Clipboard. | |
| Tracks | tracks |
| Tracks list. | |
| wxMutex | track_mutex |
| Mutex for accessing track data from multiple threads. | |
| Loaders | loaders |
| Loaders list. | |
| Devices | devices |
| Devices list. | |
| PlayCallback | pcbk |
| Playback callback. | |
| ratio_t | pratio |
| Peak display ratio. | |
| Device * | pdev |
| Playback device. | |
| wxString | fname |
| Last store filename. | |
| bool | changed |
| Changed since last store/load/new. | |
| bool | playing |
| Currently playing. | |
| bool | paused |
| Currently paused. | |
| samples_t | scursor |
| Starting cursor position. | |
| samples_t | cursor |
| Cursor position. | |
Friends | |
| samples_t | PlayCallback::OnBuffer (void *buf, const samples_t len, const samples_t pos, const format_ex_t &format) |
| Playback Callback can access project's private structures. | |
Base class of a project. Project contains tracks, cuts, loaders, devices etc.
|
|
Constructor. Initializes an empty project with default playback options. |
|
|
Destructor. Stop playback and cleanup. |
|
||||||||||||||||
|
Add a new track to the project. Adds new track (via its loader) to the project.
|
|
||||||||||||||||
|
Append clipboard to track. Append the contents of the clipboard to the given track.
|
|
|
Is the project changed since last store/load/new.
|
|
|
Check internal track structures for consistency. Iterate throught the internal structures of the project a check for consistency (i.e. the count of tracks equals to the number of allocated tracks, etc.).
|
|
|
Remove all tracks. Cleanup the project by removing and disposing all tracks. |
|
|
Open configure dialog.
|
|
||||||||||||
|
Copy track selection to clipboard.
|
|
||||||||||||
|
Copy track selection to clipboard.
|
|
||||||||||||
|
Cut track selection to clipboard.
|
|
|
Filename of the last project store.
|
|
|
Get current cursor position. Get current position of the cursor (in peak units).
|
|
|
Get default playback device.
|
|
|
Get device object. Get the 'index'-th device from the devices list by calling the register fuction.
|
|
|
Get initial peak ratio.
|
|
|
Get loader object. Get the 'index'-th loader from the loaders list by calling the register fuction.
|
|
|
Get mute flag of a track. Queries the mute or unmute state of a single track.
|
|
||||||||||||
|
Get a single peak value of a track. Get the value of a peak in current zoom factor on a given position (in zoomed units) of a track.
|
|
|
Get current playback format.
|
|
||||||||||||||||
|
Get track selection. Get the selection range of a track.
|
|
||||||||||||
|
Get output channel volume of a track. Get the volume of a given output channel of a track.
|
|
|
Get working directory.
|
|
||||||||||||||||
|
Load project from file. Create a new project from file. All previous project data is discarted.
|
|
|
Number of loader references in all tracks.
|
|
|
Create an empty project. Create a new empty project. All previous project data is discarted. |
|
|
Get number of devices.
|
|
|
Get number of loaders.
|
|
|
Number of tracks.
|
|
||||||||||||
|
Paste clipboard into a track. Paste the contents of the clipboard into the given track (at the position of the cursor). All data after the cursor position is shifted forward.
|
|
|
Pause playback. Pause or resume playback. |
|
|
Play the project. Start playback. |
|
|
Register a device object. Append a device object (its registration function) to the devices list.
|
|
|
Register a loader object. Append a loader object (its registration function) to the loaders list.
|
|
|
Remove a track from the project.
|
|
||||||||||||||||
|
Render project. Render (mix) the whole project to a file.
|
|
|
Set current cursor position. Change the cursor position (by user click, etc.).
|
|
||||||||||||
|
Set mute flag of a track. Mutes or unmutes a single track.
|
|
|
Set playback device. Set the playback device of the project. Any previously chosen device is shut down.
|
|
||||||||||||||||
|
Set track selection. Set the selection range of a track.
|
|
||||||||||||||||
|
Set output channel volume of a track. Change the volume of a given output channel of a track.
|
|
|
Stop playback. Stop playback. |
|
||||||||||||
|
Store project to file. Store the current project data to file and reset the changed flag.
|
|
|
Get track length.
|
|
|
Get number of peaks of a track. Get the number of peaks which represent the waveform of a track in current zoom factor.
|
|
|
Update the cursor during playback. Update the cursor position from the current position of the playback device.
|
|
|
Zoom waveform visualization in. Divide the zoom factor by 2, thus zoom the project in (each peak will represent less wave samples). |
|
|
Zoom waveform visualization out. Multiply the zoom factor by 2, thus zoom the project out (each peak will represent more wave samples). |
|
||||||||||||||||||||
|
Playback Callback can access project's private structures.
|
|
|
Changed since last store/load/new.
|
|
|
Clipboard.
|
|
|
Cursor position.
|
|
|
Devices list.
|
|
|
Last store filename.
|
|
|
Loaders list.
|
|
|
Currently paused.
|
|
|
Playback callback.
|
|
|
Playback device.
|
|
|
Currently playing.
|
|
|
Peak display ratio.
|
|
|
Starting cursor position.
|
|
|
Mutex for accessing track data from multiple threads.
|
|
|
Tracks list.
|
1.3.5