#include <VisualMainAction.h>
Static Public Member Functions | |
| static void | updateTiming (void) |
| static void | setDrawRect (int top, int left, int bottom, int right) |
| static void | setTotalVisualizerRect (int top, int left, int bottom, int right) |
| static void | setTotalVisualizerRectVerticalOffsetFromBottom (int top, int height) |
| static void | setAppVersionNum (int majorRev, int minorRev) |
| static void | handleInitMessage (int maxDataChannels, int numberOfWaveformEntries, int numberOfSpectrumEntries) |
| static void | setGraphicsDevice (VIZKIT_GRAPHICS_DEVICE device) |
| static void | handleShowWindowMessage (bool isFullScreen) |
| static void | handleSetWindowMessage (bool isFullScreen) |
| static void | handleRenderMessage (int currentPositionInMS, int timeStampID, int numberOfWaveformChannels, int numberOfWaveformEntries, char *waveformData, int numberOfSpectrumChannels, int numberOfSpectrumEntries, char *spectrumData) |
| static void | resetVisualAudioLabDataIfNotPaused () |
| static bool | prepareRenderAction (void) |
| static void | renderAction (void) |
| static void | finishRenderAction (void) |
| static void | handleHideWindowMessage (void) |
| static void | handleIdleAndUpdateMessage (void) |
| static void | handleAudioPlayStoppedEvent (void) |
| static void | handleAudioPlayStartedEvent (bool trackDidChange) |
| static void | setTrackPlayPositionInMS (int trackPlayPosition) |
| static void | handleShowShouldStartMessage (bool isFullscreen) |
| static void | closeThreads (void) |
| static void | closePersistentStore (void) |
| static void | handleCanvasReshape (void) |
| static void | handleOSEvent (void *anEvent) |
| static void | showConfigurationDialog (void) |
| static void | resetCurrAudioMetaData (void) |
| static void | setAudioTrackName (const void *const audioTrackName, int audioTrackNameLength) |
| static void | setAudioTrackArtistName (const void *const audioTrackArtistName, int audioTrackArtistNameLength) |
| static void | setAudioTrackAlbumName (const void *const audioTrackAlbumName, int audioTrackAlbumNameLength) |
| static void | setAudioTrackComposer (const void *const audioTrackComposer, int audioTrackComposerLength) |
| static void | setAudioStreamTitleV1 (const char *const audioStreamTitle, int audioStreamTitleLength) |
| static void | setAudioStreamTitle (const void *const audioStreamTitle, int audioStreamTitleLength) |
| static void | setAudioStreamMessageV1 (const char *const audioStreamMessage, int audioStreamMessageLength) |
| static void | setAudioStreamMessage (const void *const audioStreamMessage, int audioStreamMessageLength) |
| static void | setAudioStreamURLV1 (const char *const audioStreamURL, int audioStreamURLLength) |
| static void | setAudioStreamURL (const void *const audioStreamURL, int audioStreamURLLength) |
| static void | setAudioTrackSizeInBytes (int audioTrackSizeInBytes) |
| static void | setAudioTrackYear (int aYear) |
| static void | setAudioDataIsStream (bool isStream) |
| static bool | analyzeCurrentlySetMetadata (void) |
| static void | setTotalTimeOfCurrentTrack (int totalTimeInMS) |
| static void | setStartTimeOfCurrentTrack (int startTimeInMS) |
| static void | setStopTimeOfCurrentTrack (int stopTimeInMS) |
| static void | postTrackInfoOfCurrentAudioData (void) |
| static bool | postLyricsOfCurrentAudioData (void) |
| static void | postAlbumCoverArtworkOfCurrentAudioData (void) |
| static void | writeLogEntry (const char *const infoStr) |
Private Member Functions | |
| VisualMainAction () | |
| ~VisualMainAction () | |
Handles the events and messages passed in by iTunes. In its public section VisualMain contains the functions called by iTunes. Private static functions access the various internal classes of the visualizer. Essential events are: audio play start, audio play stop, show start, show stop, and render message. When displaying graphics, the visualizer spends most of its time with executing the render message.
| VizKit::VisualMainAction::VisualMainAction | ( | ) | [private] |
The constructor. VisualMainAction is a collection of static methods. Class does not need any instances. Constructor is private and not implemented.
| VizKit::VisualMainAction::~VisualMainAction | ( | ) | [private] |
The destructor. VisualMainAction is a collection of static methods. Class does not need any instances. Destructor is private and not implemented.
| bool VisualMainAction::analyzeCurrentlySetMetadata | ( | void | ) | [static] |
Analyzes the currently set audio track meta data.
| void VisualMainAction::closePersistentStore | ( | void | ) | [static] |
Called when visualizer plug-in is unloaded.
| void VisualMainAction::closeThreads | ( | void | ) | [static] |
Called when rendering of visualizer plug-in is closed.
| void VisualMainAction::finishRenderAction | ( | void | ) | [static] |
Finishes rendering.
| void VisualMainAction::handleAudioPlayStartedEvent | ( | bool | trackDidChange | ) | [static] |
Called when iTunes starts playing audio.
| void VisualMainAction::handleAudioPlayStoppedEvent | ( | void | ) | [static] |
Called when iTunes stops playing audio. Gathered audio data is cleared when the audio stops playing.
| void VisualMainAction::handleCanvasReshape | ( | void | ) | [static] |
Called when canvas is resized.
| void VisualMainAction::handleHideWindowMessage | ( | void | ) | [static] |
Handles the hide window message.
| void VisualMainAction::handleIdleAndUpdateMessage | ( | void | ) | [static] |
Handles the idle message.
| void VisualMainAction::handleInitMessage | ( | int | maxDataChannels, | |
| int | numberOfWaveformEntries, | |||
| int | numberOfSpectrumEntries | |||
| ) | [static] |
Handles initialization.
| maxDataChannels | The number of data channels (2 for stereo). | |
| numberOfWaveformEntries | The number of waveform data entries. | |
| numberOfSpectrumEntries | The number of spectrum data entries. |
| void VisualMainAction::handleOSEvent | ( | void * | anEvent | ) | [static] |
Handles an OS event.
| anEvent | The event to handle. |
| void VisualMainAction::handleRenderMessage | ( | int | currentPositionInMS, | |
| int | timeStampID, | |||
| int | numberOfWaveformChannels, | |||
| int | numberOfWaveformEntries, | |||
| char * | waveformData, | |||
| int | numberOfSpectrumChannels, | |||
| int | numberOfSpectrumEntries, | |||
| char * | spectrumData | |||
| ) | [static] |
Handles the render message.
| currentPositionInMS | The current position in the audio track. | |
| timeStampID | Numeric id. | |
| numberOfWaveformChannels | The number of waveform channels. | |
| numberOfWaveformEntries | The number of waveform data entries. | |
| waveformData | The waveform data. | |
| numberOfSpectrumChannels | The number of spectrum channels. | |
| numberOfSpectrumEntries | The number of spectrum data entries. | |
| spectrumData | The spectrum data. |
| void VisualMainAction::handleSetWindowMessage | ( | bool | isFullScreen | ) | [static] |
Handles the set window message.
| isFullScreen | True if fullscreen. |
| void VisualMainAction::handleShowShouldStartMessage | ( | bool | isFullscreen | ) | [static] |
Called when iTunes starts showing the visualizer.
| isFullscreen | Set to true if fullscreen. |
| void VisualMainAction::handleShowWindowMessage | ( | bool | isFullScreen | ) | [static] |
Handles the show windows message.
| isFullScreen | True if fullscreen. |
| void VisualMainAction::postAlbumCoverArtworkOfCurrentAudioData | ( | void | ) | [static] |
Posts the album cover artwork of the current audio data.
| bool VisualMainAction::postLyricsOfCurrentAudioData | ( | void | ) | [static] |
Posts the lyrics of the current audio data.
| void VisualMainAction::postTrackInfoOfCurrentAudioData | ( | void | ) | [static] |
Posts the track info string of the current audio data.
| bool VisualMainAction::prepareRenderAction | ( | void | ) | [static] |
Prepares rendering.
| void VisualMainAction::renderAction | ( | void | ) | [static] |
The rendering action executed with each kVisualPluginRenderMessage/kVisualPluginIdleMessage.
| void VisualMainAction::resetCurrAudioMetaData | ( | void | ) | [static] |
Resets the currently set audio meta data.
| void VisualMainAction::resetVisualAudioLabDataIfNotPaused | ( | ) | [static] |
Resets the audio lab data for the play message (in case the audio track does not unpause).
| void VisualMainAction::setAppVersionNum | ( | int | majorRev, | |
| int | minorRev | |||
| ) | [static] |
Handles initialization.
| majorRev | Major revision number. | |
| minorRev | Minor revision number. |
| void VisualMainAction::setAudioDataIsStream | ( | bool | isStream | ) | [static] |
Sets whether the current audio data is a stream.
| void VisualMainAction::setAudioStreamMessage | ( | const void *const | audioStreamMessage, | |
| int | audioStreamMessageLength | |||
| ) | [static] |
Sets the message of an audio track.
| void VisualMainAction::setAudioStreamMessageV1 | ( | const char *const | audioStreamMessage, | |
| int | audioStreamMessageLength | |||
| ) | [static] |
Sets the message of an audio stream.
| void VisualMainAction::setAudioStreamTitle | ( | const void *const | audioStreamTitle, | |
| int | audioStreamTitleLength | |||
| ) | [static] |
Sets the title of an audio stream.
| void VisualMainAction::setAudioStreamTitleV1 | ( | const char *const | audioStreamTitle, | |
| int | audioStreamTitleLength | |||
| ) | [static] |
Sets the title of an audio stream.
| void VisualMainAction::setAudioStreamURL | ( | const void *const | audioStreamURL, | |
| int | audioStreamURLLength | |||
| ) | [static] |
Sets the URL of an audio track.
| void VisualMainAction::setAudioStreamURLV1 | ( | const char *const | audioStreamURL, | |
| int | audioStreamURLLength | |||
| ) | [static] |
Sets the URL of an audio stream.
| void VisualMainAction::setAudioTrackAlbumName | ( | const void *const | audioTrackAlbumName, | |
| int | audioTrackAlbumNameLength | |||
| ) | [static] |
Sets the album name of the audio track.
| void VisualMainAction::setAudioTrackArtistName | ( | const void *const | audioTrackArtistName, | |
| int | audioTrackArtistNameLength | |||
| ) | [static] |
Sets the artist name of the audio track.
| void VisualMainAction::setAudioTrackComposer | ( | const void *const | audioTrackComposer, | |
| int | audioTrackComposerLength | |||
| ) | [static] |
Sets the name of the composer of the audio track.
| void VisualMainAction::setAudioTrackName | ( | const void *const | audioTrackName, | |
| int | audioTrackNameLength | |||
| ) | [static] |
Sets the name of the audio track.
| void VisualMainAction::setAudioTrackSizeInBytes | ( | int | audioTrackSizeInBytes | ) | [static] |
Sets the size in bytes of the audio track.
| void VisualMainAction::setAudioTrackYear | ( | int | aYear | ) | [static] |
Sets the year of the audio track.
| void VisualMainAction::setDrawRect | ( | int | top, | |
| int | left, | |||
| int | bottom, | |||
| int | right | |||
| ) | [static] |
Stored the dimensions of the draw rectangle.
| top | The top pixel position. | |
| left | The left pixel position. | |
| bottom | The bottom pixel position. | |
| right | The right pixel position. |
| void VisualMainAction::setGraphicsDevice | ( | VIZKIT_GRAPHICS_DEVICE | device | ) | [static] |
Sets the pointer to the graphics device.
| device | The device to use for rendering. |
| void VisualMainAction::setStartTimeOfCurrentTrack | ( | int | startTimeInMS | ) | [static] |
Sets the start time of the current audio track.
| void VisualMainAction::setStopTimeOfCurrentTrack | ( | int | stopTimeInMS | ) | [static] |
Sets the stop time of the current audio track.
| void VisualMainAction::setTotalTimeOfCurrentTrack | ( | int | totalTimeInMS | ) | [static] |
Sets the total time of the current audio track.
| void VisualMainAction::setTotalVisualizerRect | ( | int | top, | |
| int | left, | |||
| int | bottom, | |||
| int | right | |||
| ) | [static] |
Stored the dimensions of the total visualizer rectangle.
| top | The top pixel position. | |
| left | The left pixel position. | |
| bottom | The bottom pixel position. | |
| right | The right pixel position. |
| void VisualMainAction::setTotalVisualizerRectVerticalOffsetFromBottom | ( | int | top, | |
| int | height | |||
| ) | [static] |
Stores the vertical offset of the surface rect from the bottom of the iTunes window.
| top | The top pixel position of the total visualizer rect. | |
| height | The height of the total visualizer rect. |
| void VisualMainAction::setTrackPlayPositionInMS | ( | int | trackPlayPosition | ) | [static] |
Updates the tracked play position.
| void VisualMainAction::showConfigurationDialog | ( | void | ) | [static] |
Opens the dialog UI for configuration options.
| void VisualMainAction::updateTiming | ( | void | ) | [static] |
Updates the current timestamp of the timing engine.
| void VisualMainAction::writeLogEntry | ( | const char *const | infoStr | ) | [static] |
Writes a 8-bit string to the system log file.
| infoStr | The 8-bit string to write to log file. |