Performs conversions between number of samples, milliseconds and smpte format (hours::minutes::seconds::frames::subframes).
More...
|
| | SMPTE (SMPTE_RATE smpte_rate=SMPTE_RATE_30, SAMPLE_RATE sample_rate=SAMPLE_48000) |
| | The constructor sets the smpte rate to SMPTE_30, the sample rate to SAMPLE_48000 and the offset time to 0. More...
|
| |
| void | SetSMPTERate (SMPTE_RATE r) |
| | Sets the smpte rate. See SMPTE_RATE for avalaible smpte rate formats. More...
|
| |
| SMPTE_RATE | GetSMPTERate () const |
| | Returns the smpte rate. See SMPTE_RATE for avalaible smpte rate formats. More...
|
| |
| void | SetSampleRate (SAMPLE_RATE r) |
| | Sets the sample rate. See SAMPLE_RATE for avalaible sample rates formats. More...
|
| |
| SAMPLE_RATE | GetSampleRate () const |
| | Returns the sample rate. See SAMPLE_RATE for avalaible sample rates formats. More...
|
| |
| void | SetOffset (unsigned long n) |
| | Sets an offset to be added to the current time, given the amount of samples. More...
|
| |
| void | SetOffset (unsigned char h, unsigned char m, unsigned char s, unsigned char f=0, unsigned char sf=0) |
| | Sets an offset to be added to the current time, given the smpte time parameters. More...
|
| |
| unsigned long | GetOffset () const |
| | Returns the time offset (in samples). More...
|
| |
| unsigned long | GetSampleNumber () |
| | Performs a smpte-to-samples or milliseconds-to-samples conversion. More...
|
| |
| void | SetSampleNumber (unsigned long n) |
| | Loads the SMPTE with the given amount of samples. More...
|
| |
| unsigned long | GetMilliSeconds () |
| | Performs a smpte-to-millisecond or sample-to-millisecond conversion. More...
|
| |
| void | SetMilliSeconds (unsigned long msecs) |
| | Loads the SMPTE with the given time in milliseconds. More...
|
| |
|
These perform a samples-to-smpte or milliseconds-to-smpte conversion. You must first load the SMPTE with the number of samples (using SetSampleNumber()) or the number of milliseconds (using SetMilliSeconds()) to convert; then you can call these to get the converted smpte values.
- Note
- These are NOT const! May perform an internal conversion.
|
| unsigned char | GetHours () |
| | Returns the smpte hours. More...
|
| |
| unsigned char | GetMinutes () |
| | Returns the smpte minutes. More...
|
| |
| unsigned char | GetSeconds () |
| | Returns the smpte seconds. More...
|
| |
| unsigned char | GetFrames () |
| | Returns the smpte frames. More...
|
| |
| unsigned char | GetSubFrames () |
| | Returns the smpte subframes. More...
|
| |
|
Use these to convert from smpte.
|
| void | SetTime (unsigned char h, unsigned char m, unsigned char s, unsigned char f=0, unsigned char sf=0) |
| | Loads the SMPTE with the given time (in smpte format). More...
|
| |
| void | SetHours (unsigned char h) |
| | Loads the SMPTE with the given smpte hours, leaving unchanged other parameters. More...
|
| |
| void | SetMinutes (unsigned char m) |
| | Loads the SMPTE with the given smpte minutes, leaving unchanged other parameters. More...
|
| |
| void | SetSeconds (unsigned char s) |
| | Loads the SMPTE with the given smpte seconds, leaving unchanged other parameters. More...
|
| |
| void | SetFrames (unsigned char f) |
| | Loads the SMPTE with the given smpte frames, leaving unchanged other parameters. More...
|
| |
| void | SetSubFrames (unsigned char sf) |
| | Loads the SMPTE with the given smpte subframes, leaving unchanged other parameters. More...
|
| |
|
These functions add, increment or decrement the current sample number.
|
| void | AddSamples (long n) |
| | Adds n samples. More...
|
| |
| void | IncSamples () |
| | Adds one sample. More...
|
| |
| void | DecSamples () |
| | Subtracts one sample. More...
|
| |
|
These functions add, increment or decrement smpte time parameters.
|
| void | AddHours (signed char h) |
| | Adds hours to smpte time. More...
|
| |
| void | AddMinutes (signed char m) |
| | Adds minutes to smpte time. More...
|
| |
| void | AddSeconds (signed char s) |
| | Adds seconds to smpte time. More...
|
| |
| void | AddFrames (signed char f) |
| | Adds frames to smpte time. More...
|
| |
| void | AddSubFrames (signed char sf) |
| | Adds subframes to smpte time. More...
|
| |
| void | IncHours () |
| | Adds one hour to smpte time. More...
|
| |
| void | IncMinutes () |
| | Adds one minute to smpte time. More...
|
| |
| void | IncSeconds () |
| | Adds one second to smpte time. More...
|
| |
| void | IncFrames () |
| | Adds one frame to smpte time. More...
|
| |
| void | IncSubFrames () |
| | Adds one subframe to smpte time. More...
|
| |
| void | DecHours () |
| | Subtract one hour from smpte time. More...
|
| |
| void | DecMinutes () |
| | Subtract one minute from smpte time. More...
|
| |
| void | DecSeconds () |
| | Subtract one second from smpte time. More...
|
| |
| void | DecFrames () |
| | Subtract one frame from smpte time. More...
|
| |
| void | DecSubFrames () |
| | Subtract one subframe from smpte time. More...
|
| |
|
- Note
- All these are NOT const! May perform an internal conversion
|
| bool | operator== (SMPTE &s) |
| | Equal. More...
|
| |
| bool | operator!= (SMPTE &s) |
| | Not equal. More...
|
| |
| bool | operator< (SMPTE &s) |
| | Lesser. More...
|
| |
| bool | operator> (SMPTE &s) |
| | Greater. More...
|
| |
| bool | operator<= (SMPTE &s) |
| | Lesser or equal. More...
|
| |
| bool | operator>= (SMPTE &s) |
| | Greater or equal. More...
|
| |
Performs conversions between number of samples, milliseconds and smpte format (hours::minutes::seconds::frames::subframes).
You can choose between several smpte formats and sample rates (see SMPTE_RATE and SAMPLE_RATE). Moreover you can set an initial time offset to be added to every value passed to the SMPTE.
- Note
- Many get functions are NOT const because they can perform internal conversions
- Examples
- test_win32_player.cpp.