# MP3 and WAV Files streaming on tivo



## thalha (Mar 18, 2008)

like mp3, can we stream wav files on tivo using the functions in tivo sdk? if so...how?
Thanks in Advance!..


----------



## jbcooley (May 13, 2007)

thalha said:


> like mp3, can we stream wav files on tivo using the functions in tivo sdk? if so...how?
> Thanks in Advance!..


The tivo only supports mp3s. I should support very small pcm format files, but that support is broken.

Here's a link to information on how the pcm format should work:
http://tivohme.sourceforge.net/docs/hmesdk/02_KeyConcepts.html#wp999172
And it's limit of 128kb
http://tivohme.sourceforge.net/docs/hmesdk/03_Running.html#wp999920


----------



## thalha (Mar 18, 2008)

Hi,
Thanks for the reply..

can u guide me how to stream a mp3 file using the tivo sdk?

Regards
Thalha



jbcooley said:


> The tivo only supports mp3s. I should support very small pcm format files, but that support is broken.
> 
> Here's a link to information on how the pcm format should work:
> http://tivohme.sourceforge.net/docs/hmesdk/02_KeyConcepts.html#wp999172
> ...


----------



## jbcooley (May 13, 2007)

thalha said:


> Hi,
> Thanks for the reply..
> 
> can u guide me how to stream a mp3 file using the tivo sdk?
> ...


My experience comes from writing an sdk in C#. I can help you out more with a .NET based application, but I'll point you to a sample in the java samples that should help you.

Download the sdk and look in here:
\hme_sdk_1.4\samples\src\com\tivo\hme\samples\music

You may have to unzip some files along the way to get the src directory.

Here's the relevant snippet of code:


```
/**
 * Play a url
 */
void playTrack(String url)
{
    Resource resource = getResource();
    // stop the current stream
    if (resource != null) {
        resource.remove();
    }
    // start the new one
    setResource(createStream(url, null, true));
}
```


----------

