Class Shout
In: ext/shout.c
Parent: Object

Methods

agent   agent=   close   connect   connected?   delay   description   description=   disconnect   dumpfile   dumpfile=   format   format=   genre   genre=   host   host=   metadata=   mount   mount=   name   name=   new   open   pass   pass=   password   password=   port   port=   protocol   protocol=   public   public=   send   sync   url   url=   user   user=   user_agent   user_agent=   username   username=   version  

Constants

HTTP = INT2FIX(SHOUT_PROTOCOL_HTTP)
XAUDIOCAST = INT2FIX(SHOUT_PROTOCOL_XAUDIOCAST)
ICY = INT2FIX(SHOUT_PROTOCOL_ICY)
MP3 = INT2FIX(SHOUT_FORMAT_MP3)
OGG = INT2FIX(SHOUT_FORMAT_OGG)
VORBIS = INT2FIX(SHOUT_FORMAT_VORBIS)

Public Class methods

Make a new shout object. This method does not connect to any server. See connect.

Returns the libshout version, as a string.

Public Instance methods

Set the User-Agent reported. The default is "libshout/<libshout version>", e.g. "libshout/2.0.0".

Disconnect from the server.

Connect to the server. You must set all the parameters you’re going to set before connecting.

Returns true if connected, false otherwise, nil if something really crazy happened.

Return the proper amount of time, in milliseconds, before more data needs to be sent. This is for use when you would like to do something else in the intervening time period besides sleep.

Set a longer description of the stream. Probably several lines of text.

Disconnect from the server.

Set a filename where the server should dump the data from this stream. Only do this if you know what you are doing.

Set the format of the audio. Possible values are:

Shout::VORBIS
Ogg Vorbis
Shout::MP3
MP3

Set the ‘genre’ of the stream.

Set the hostname to connect to. The default is localhost.

Set MP3 metadata. Create a ShoutMetadata object, add some stuff to it and pass it to this method. If the format of the stream isn’t MP3, and you try to set its metadata, an exception will most likely be raised.

Set the mountpoint on the server.

Set the name of the stream, e.g. "monkey’s radio tunes."

Connect to the server. You must set all the parameters you’re going to set before connecting.

Set the password to authenticate with. The default is no password.

Set the password to authenticate with. The default is no password.

Set the destination port. The default is 8000.

Set the protocol to use when connecting. Default is Shout::HTTP. Possible values are:

Shout::HTTP
HTTP; the protocol used by Icecast.
Shout::XAUDIOCAST
XAudioCast. Obsolete.
Shout::ICY
Icy. Obsolete. Used by Shoutcast.

Set whether or not this stream should be "public", i.e. advertised to a yp server such as yp.icecast.org. True or false. Nil counts as false.

Send some data. to_send is a String containing the data to send.

Sleep the necessary amount of time to play back the audio data sent since the last call to sync. After calling this, it’s time to send more data.

Set the URL to send the data to. Takes a string.

Set the user to authenticate as. The default is "source".

Set the User-Agent reported. The default is "libshout/<libshout version>", e.g. "libshout/2.0.0".

Set the user to authenticate as. The default is "source".

[Validate]