Media Driver

Modified on 2010/02/24 22:11 by Administrator — Categorized as: Driver

The media driver allows playing media on any machine running the driver service.

This driver allows multiple instances.


Driver Parameters

none

Events

none

Instance Methods

PlayWavFile

Plays a .WAV file.

Syntax:

void PlayWavFile( String filepath )

Parameters:

filepath : The file path of the .WAV file.

Be careful when creating strings with file paths as the \ character is interpreted as an escape character. Review the String Literal Documentation for more information.

Example:

media.PlayWavFile( @"c:\hello.wav" );

PlayMediaFile

Plays a media file. This supports various formats such as .MP3 or .WAV files.

Syntax:

void PlayMediaFile( String filepath )

Parameters:

filepath : The file path of the media file.

Be careful when creating strings with file paths as the \ character is interpreted as an escape character. Review the String Literal Documentation for more information.

Example:

media.PlayMediaFile( @"c:\hello.mp3" );

PauseMediaFile

Pause the currently playing media that was started by invoking PlayMediaFile().

Syntax:

void PauseMediaFile( )

Example:

media.PauseMediaFile( );

UnpauseMediaFile

Unpause the currently paused media that was started by invoking PlayMediaFile().

Syntax:

void UnpauseMediaFile( )

Example:

media.UnpauseMediaFile( );



Unpause media file Unpause the currently paused media. UnPauseMediaFile()

TextToSpeech

The computer will speak the specified text using the configuration in the Text To Speech control panel.

Syntax:

void TextToSpeech( String text )

Parameters:

text : The text to speak.

Example:

media.TextToSpeech( "Hello " + name + ", how are you?" );