Delphi interface for Windows Media Audio (WMA) using Windows’ built-in codec.
| ACS_WinMedia | Delphi interface for Windows Media Audio (WMA) using Windows’ built-in codec. |
| TWMIn | Windows Media Audio file/stream decoder. |
| Properties | |
| FormatsCount | WMA decoders allow the program to read input data in several formats (each format is a set of channels, bits per sample and sample rate numbers. |
| FormatSpec[Index : Integer] | Read this property to get the parameters of the format specified by its Index. |
| FormatSelected | Use this property to set the desired format for the decoder’s output. |
| HasAudio | Read this property to determine if the input file has an audio stream. |
| IsProtected | If the value of this property is True, the file is DRM-protected and hence not supported. |
| Bitrate | Read this property to get the file’s bitrate. |
| Id3v2Tags | This property contains file’s tags in Id3v2 format. |
| IsVBR | This property’s value is True if the input file is VBR-encoded and False otherwise. |
| HighPrecision | Use HighPrecision to set the high precision decoding mode on or off. |
| OutputChannels | Sets the number of channels for decoder output. |
| TWMAOut | Windows Media Audio file/stream encoder. |
| Functions | |
| GetFormatDesc | This method returns a format description based on the CodecIndex and FormatIndex parameters. |
| Properties | |
| Codecs | Returns the names of all the WMA codecs installed in the system. |
| CodecsCount | Returns the total number of the WMA codecs available in the system. |
| CodecIndex | Use this property to set the index number of the codec to use when encoding. |
| CodecName | Returns the name of the WMA codec specified by its index. |
| FormatIndex | Use this property to set the index of the format to encode data. |
| Formats | Returns the names of all formats supported by the codec, specified by the Index and the current encoding mode. |
| FormatsCount | Returns the total number of formats supported by the codec, specified by its index, and the current encoding mode. |
| Id3v2Tags | Set an output file’s tags in Id3v2 format. |
| DesiredBitrate | Set the desired bitrate for an output file (in the constant bitrate lossy mode). |
| Lossless | Use this property to switch between the lossless and lossy compression modes. |
| VBR | Use this property to switch between constant bitrate and variable bitrate lossy encoding modes. |
| VBRQuality | Use this property to set the output audio quality in VBR mode. |
| A Note on Windows Media Formats | The VBR and Lossless settings affect the values of Formats and FormatsCount properies. |
| TWMATap | Descends from TAudioTap. |
| Properties | |
| Id3v2Tags | Set an output file’s tags in Id3v2 format. |
| DesiredBitrate | Set the desired bitrate for an output file (in the constant bitrate lossy mode). |
| Lossless | Use this property to switch between the lossless and lossy compression modes. |
| VBR | Use this property to switch between constant bitrate and variable bitrate lossy encoding modes. |
| VBRQuality | Use this property to set the output audio quality in VBR mode. |
| TWMStreamedIn | |
| Properties | |
| HasAudio | Read this property to determine if the input file has an audio stream. |
| Bitrate | Read this property to get the file’s bitrate. |
| Id3v2Tags | This property contains file’s tags in Id3v2 format. |
| TimedOut | This property indicates if some network operation has timed out. |
| BufferingTime | This property allows you to set the size of internal buffer in terms of playback duration. |
| EnableHTTP | Use this property to enable or disable HTTP support. |
| EnableTCP | Use this property to enable or disable TCP support. |
| EnableUDP | Use this property to enable or disable UDP support. |
| LoggingURL | Use this property to set a logging URL, if you have one. |
| MaxWaitMilliseconds | This property allows you to set the maximum waiting time for some network operations to complete. |
| ProxyProtocol | If your application requires a proxy to connect to Internet, use this property to set the proxy protocol. |
| ProxyHost | If your application requires a proxy to connect to Internet, use this property to set the proxy host name. |
| ProxyPort | If your application requires a proxy to connect to Internet, use this property to set the proxy port value. |
| StretchFactor | Use this property to change the speed at with content is delivered to the component. |
| OnStreamOpened | This event informs you that the audio stream has been opened successfully. |
| OnStartedPlaying | This event informs you that the decoder has decoded the first chunk of audio data. |
| TWMStreamedOut | This component can stream Windows Media audio over HTTP in local or global networks. |
| Properties | |
| ConnectionsCount | The number of incoming connections. |
| Connections[Index : Integer] | Use this property to get an information about an incoming connection. |
| URL | Use this property to get the transmitting host URL. |
| MaxClients | The maximum number of incoming connctions allowed. |
| Port | The number of port on which the component will listen for incoming connections. |
| OnClientConnected | The OnClientConnected event is raised when a new client connects to the transmitter. |
| OnClientDisconnected | The OnClientDisconnected event is raised when a client disconnects from the transmitter. |
| TWMADualPassOut | This component implements Windows Media Audio 2-pass encoder. |
| Functions | |
| GetFormatDesc | This method returns a format description based on the CodecIndex and FormatIndex parameters. |
| Properties | |
| Codecs | Returns the names of all the WMA codecs installed in the system. |
| CodecsCount | Returns the total number of the WMA codecs available in the system. |
| CodecIndex | Use this property to set the index number of the codec to use when encoding. |
| CodecName | Returns the name of the WMA codec specified by its index. |
| FormatIndex | Use this property to set the index of the format to encode data. |
| Formats | Returns the names of all formats supported by the codec, specified by the Index and the current encoding mode. |
| FormatsCount | Returns the total number of formats supported by the codec, specified by its index, and the current encoding mode. |
| Id3v2Tags | Set an output file’s tags in Id3v2 format. |
| VBR | Use this property to switch between constant bitrate and variable bitrate encoding modes. |
Windows Media Audio file/stream decoder. This component can read not only WMA files but sound tracks from WMV files as well. It can also read mp3 files. Descends from TAuTaggedFileIn .
| Properties | |
| FormatsCount | WMA decoders allow the program to read input data in several formats (each format is a set of channels, bits per sample and sample rate numbers. |
| FormatSpec[Index : Integer] | Read this property to get the parameters of the format specified by its Index. |
| FormatSelected | Use this property to set the desired format for the decoder’s output. |
| HasAudio | Read this property to determine if the input file has an audio stream. |
| IsProtected | If the value of this property is True, the file is DRM-protected and hence not supported. |
| Bitrate | Read this property to get the file’s bitrate. |
| Id3v2Tags | This property contains file’s tags in Id3v2 format. |
| IsVBR | This property’s value is True if the input file is VBR-encoded and False otherwise. |
| HighPrecision | Use HighPrecision to set the high precision decoding mode on or off. |
| OutputChannels | Sets the number of channels for decoder output. |
WMA decoders allow the program to read input data in several formats (each format is a set of channels, bits per sample and sample rate numbers. Read this property to get the total number of formats available.
Note: the number of formats provided by the encoder depends on the HighPrecision value (formats with 24 bps and more than 2 channels will be available only if HighPrecision is set to True).
Read this property to get the parameters of the format specified by its Index. Valid Index values range from 0 to FormatsCount - 1.
Use this property to set the desired format for the decoder’s output. Valid values range from 0 to FormatsCount - 1. There is also a special constant - wmfDefault. If you set the property value to wmfDefault the output audio format will be the “main format”, the one that was used when the file was encoded. This property affects the <Channels>, <BitsPerSample>, <SampleRate>, <Size>, and <TotalSamples> properties. Setting this property value overrides OutputChannels’s value. Set this property value before you call Run for the corresponding output component.
Read this property to determine if the input file has an audio stream. The False value indicates that either an audio stream is missing (in WMV file) or the input file is corrupt.
Windows Media files may contain several audio streams. In the current version TWMIn reads data only from the first audio stream it finds.
Use HighPrecision to set the high precision decoding mode on or off. In normal precision mode the decoder will produce only 16-bit 1 or 2 channel output, even if the input file is 24-bit multi-channel. If you want to obtain 24-bit sound or more than two channels, set HighPrecision to True. This property is set to True automatically if you assign to the OutputChannels property some value other than cnMonoOrStereo.
Sets the number of channels for decoder output.
Use cnMaxAvailable value if you don’t know how many channels the input file contains and want to play all of them. Note however that cnMaxAvailable upsamples audio ooutput (usually to 48000 Hz) which is not always desirable. Use cnMonoOrStereo if you want your output to be always mono or stereo (this mode is useful if you play sound on the hardware that doesn’t support multiple channels). If the input file is multi-channel and cnMonoOrStereo mode is selected, the channels will be mixed into stereo. Use cn5dot1 if you are sure that the inpt file contains at least 6 channels. Forsing 6 channels ouput on the file that doesn’t have enough channels may cause crash. Use cn7dot1 if you are sure that the inpt file contains at least 8 channels. Forsing 8 channels on the file that doesn’t have them may cause crash. See also the HighPrecision property.
Windows Media Audio file/stream encoder. This component supports CBR/VBR, lossy/lossless encoding. There are two mutually exclusive groups of properties affecting the output audio quality. One group allows you to set output file bitrate or quality and let the component select the most appropriate codec. The other group allows you to specify the codec and format directly. This component descends from TAuTaggedFileOut.
| Functions | |
| GetFormatDesc | This method returns a format description based on the CodecIndex and FormatIndex parameters. |
| Properties | |
| Codecs | Returns the names of all the WMA codecs installed in the system. |
| CodecsCount | Returns the total number of the WMA codecs available in the system. |
| CodecIndex | Use this property to set the index number of the codec to use when encoding. |
| CodecName | Returns the name of the WMA codec specified by its index. |
| FormatIndex | Use this property to set the index of the format to encode data. |
| Formats | Returns the names of all formats supported by the codec, specified by the Index and the current encoding mode. |
| FormatsCount | Returns the total number of formats supported by the codec, specified by its index, and the current encoding mode. |
| Id3v2Tags | Set an output file’s tags in Id3v2 format. |
| DesiredBitrate | Set the desired bitrate for an output file (in the constant bitrate lossy mode). |
| Lossless | Use this property to switch between the lossless and lossy compression modes. |
| VBR | Use this property to switch between constant bitrate and variable bitrate lossy encoding modes. |
| VBRQuality | Use this property to set the output audio quality in VBR mode. |
| A Note on Windows Media Formats | The VBR and Lossless settings affect the values of Formats and FormatsCount properies. |
Use this property to set the index number of the codec to use when encoding. The valid values for this property range from -1 to CodecsCount - 1. If this property’s value is set to -1 (the default setting), the FormatIndex property is ignored and the codec is selected automatically by the component depending on DesiredBitrate and VBRQuality values. If this property’s value is greater than -1, the DesiredBitrate and VBRQuality properties are ignored and CodecIndex along with FormatIndex specify how audio data will be encoded. Wav2WMA-2 demo uses this method.
Returns the name of the WMA codec specified by its index. The valid indices range from 0 to CodecsCount -1.
Use this property to set the index of the format to encode data. Valid values range from 0 to FormatsCount -1. This property has an effect only if CodecIndex is greater than -1.
Returns the names of all formats supported by the codec, specified by the Index and the current encoding mode. See the Wav2WMA2 demo for an example. See also A Note on Windows Media Formats.
Returns the total number of formats supported by the codec, specified by its index, and the current encoding mode. The valid indices range from 0 to CodecsCount -1. Please see A Note on Windows Media Formats.
Use this property to switch between the lossless and lossy compression modes. In the lossless mode the DesiredBitrate and VBRQuality values are ignored. Lossless encoding is always VBR.
Use this property to switch between constant bitrate and variable bitrate lossy encoding modes. In VBR mode DesiredBitrate value is ignored. The quality of the output sound is defined by the VBRQuality property. If you encode data by directly selecting the codec and format, note that the VBR setting affects Formats and FormatsCount values for every codec. In the lossless mode the this property’s value is ignored.
The VBR and Lossless settings affect the values of Formats and FormatsCount properies. For example, Windows Media Audio Lossless codec (which is VBR) will show any formats only if VBR or Lossless property is set to True. Conversely, Windows Media Voice codec exposes only CBR formats. It will expose any formats only if VBR and Lossless are both False. You should re-read the format-related properties each time you change either the VBR or Lossless values.
Descends from TAudioTap. This is one of the “audio tap” components that sit between input and output in the audio chain and optionally record the audio data passing through them into a file. This component records data into WMA files.
| Properties | |
| Id3v2Tags | Set an output file’s tags in Id3v2 format. |
| DesiredBitrate | Set the desired bitrate for an output file (in the constant bitrate lossy mode). |
| Lossless | Use this property to switch between the lossless and lossy compression modes. |
| VBR | Use this property to switch between constant bitrate and variable bitrate lossy encoding modes. |
| VBRQuality | Use this property to set the output audio quality in VBR mode. |
Use this property to switch between the lossless and lossy compression modes. In the lossless mode the DesiredBitrate and VBRQuality values are ignored. Lossless encoding is always VBR.
Use this property to switch between constant bitrate and variable bitrate lossy encoding modes. In VBR mode DesiredBitrate value is ignored. The quality of the output sound is defined by the VBRQuality property.
You should assign file or stream URL to the component’s <FileName> property.
Most links to Internet streamed media that you can find on Web sites point not to media itself but to wax, asx, or m3u shortcuts instead. These shortcuts contain information about the content, and, among other things, a direct link to a streaming audio server. Although it is relatively easy to parse wax, asx, and m3u shortcuts and extract required links from them, it is not TWMStreamedIn’s job. The component expects a direct link to a wma/mp3 file or a network stream to be assigned to its <Filename> property. See also the LoggingURL property.
If you write a live audio player, you have to take care about http links traversal and shortcuts parsing. I-Radio demo that accompanies NewAC, uses preset links to several live audio servers.
This decoder is not seekable.
Descends from TAuTaggedFileIn.
| Properties | |
| HasAudio | Read this property to determine if the input file has an audio stream. |
| Bitrate | Read this property to get the file’s bitrate. |
| Id3v2Tags | This property contains file’s tags in Id3v2 format. |
| TimedOut | This property indicates if some network operation has timed out. |
| BufferingTime | This property allows you to set the size of internal buffer in terms of playback duration. |
| EnableHTTP | Use this property to enable or disable HTTP support. |
| EnableTCP | Use this property to enable or disable TCP support. |
| EnableUDP | Use this property to enable or disable UDP support. |
| LoggingURL | Use this property to set a logging URL, if you have one. |
| MaxWaitMilliseconds | This property allows you to set the maximum waiting time for some network operations to complete. |
| ProxyProtocol | If your application requires a proxy to connect to Internet, use this property to set the proxy protocol. |
| ProxyHost | If your application requires a proxy to connect to Internet, use this property to set the proxy host name. |
| ProxyPort | If your application requires a proxy to connect to Internet, use this property to set the proxy port value. |
| StretchFactor | Use this property to change the speed at with content is delivered to the component. |
| OnStreamOpened | This event informs you that the audio stream has been opened successfully. |
| OnStartedPlaying | This event informs you that the decoder has decoded the first chunk of audio data. |
Read this property to determine if the input file has an audio stream. The False value indicates that either an audio stream is missing (in WMV file) or the input file is corrupt.
Windows Media files may contain several audio streams. In the current version TWMIn reads data only from the first audio stream it finds.
This property indicates if some network operation has timed out. If the timeout has occurred, the component reports the end of data. You can change the time the component waits before timeout in the MaxWaitMilliseconds property.
This property allows you to set the size of internal buffer in terms of playback duration. The value of this property should be buffer’s playback time in seconds raging from 1 to 60. Larger buffering time imposes some delay at the beginning of the playback, but helps to provide smoother playback later.
This property allows you to set the maximum waiting time for some network operations to complete. The time is set in milliseconds. If this time is exceeded, the TimedOut property is set to True and the component stops its operation. The default value of this property is 10000 (10 seconds). Setting this property’s value too low will result in too many premature timeouts. Setting it too high will mean that you will have to wait too long just to learn that the remote server could not be reached.
This component can stream Windows Media audio over HTTP in local or global networks. You can listen to the streamed audio using such players as Windows Media Player, WinAmp, or NewAC demo i-Radio. Audio stream is not a file. You cannot download it to your hard drive (but you can record it). When connecting to the audio-streaming host from a player, don’t forget to use http: prefix or the player will not know what protocol to use.
| Properties | |
| ConnectionsCount | The number of incoming connections. |
| Connections[Index : Integer] | Use this property to get an information about an incoming connection. |
| URL | Use this property to get the transmitting host URL. |
| MaxClients | The maximum number of incoming connctions allowed. |
| Port | The number of port on which the component will listen for incoming connections. |
| OnClientConnected | The OnClientConnected event is raised when a new client connects to the transmitter. |
| OnClientDisconnected | The OnClientDisconnected event is raised when a client disconnects from the transmitter. |
Use this property to get an information about an incoming connection. Valid Index values range from 0 to ConnectionsCount - 1.
Use this property to get the transmitting host URL. This URL usually takes form http://your_host_name:<Port>. The URL value becomes available only after you call Run and not at once.
This component implements Windows Media Audio 2-pass encoder. TWMADualPassOut supports CBR/VBR lossy encoding in formats available for the 2-pass encoder. In order o perform 2-pass encoding TWMADualPassOut reads audio data from its input component twice. This puts some constraints on what TWMADualPassOut’s input may be (it should be a TAuFileIn-descending component). This component descends from TAuTaggedFileOut.
| Functions | |
| GetFormatDesc | This method returns a format description based on the CodecIndex and FormatIndex parameters. |
| Properties | |
| Codecs | Returns the names of all the WMA codecs installed in the system. |
| CodecsCount | Returns the total number of the WMA codecs available in the system. |
| CodecIndex | Use this property to set the index number of the codec to use when encoding. |
| CodecName | Returns the name of the WMA codec specified by its index. |
| FormatIndex | Use this property to set the index of the format to encode data. |
| Formats | Returns the names of all formats supported by the codec, specified by the Index and the current encoding mode. |
| FormatsCount | Returns the total number of formats supported by the codec, specified by its index, and the current encoding mode. |
| Id3v2Tags | Set an output file’s tags in Id3v2 format. |
| VBR | Use this property to switch between constant bitrate and variable bitrate encoding modes. |
Use this property to set the index number of the codec to use when encoding. The valid values for this property range from 0 to CodecsCount - 1.
Returns the name of the WMA codec specified by its index. The valid indices range from 0 to CodecsCount -1.
Use this property to set the index of the format to encode data. Valid values range from 0 to FormatsCount -1. This property has an effect only if CodecIndex is greater than -1.
Returns the total number of formats supported by the codec, specified by its index, and the current encoding mode. The valid indices range from 0 to CodecsCount -1.
This method returns a format description based on the CodecIndex and FormatIndex parameters.
function GetFormatDesc( CodecIndex, FormatIndex : Word ) : String
This method returns a format description based on the CodecIndex and FormatIndex parameters.
function GetFormatDesc( CodecIndex, FormatIndex : Word ) : String