arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
audio_tools::AudioSourceURL Class Reference

Audio Source which provides the data via the network from an URL. More...

#include <AudioSource.h>

Inheritance diagram for audio_tools::AudioSourceURL:
audio_tools::AudioSource

Public Member Functions

template<typename T , size_t N>
 AudioSourceURL (AbstractURLStream &urlStream, T(&urlArray)[N], const char *mime, int startPos=0)
 
virtual void begin () override
 Setup Wifi URL. More...
 
int index ()
 
virtual bool isAutoNext ()
 Returns default setting go to the next. More...
 
StreamnextStream (int offset) override
 Opens the next url from the array. More...
 
StreampreviousStream (int offset) override
 Opens the Previous url from the array. More...
 
StreamselectStream (const char *path) override
 Opens the selected url. More...
 
StreamselectStream (int idx) override
 Opens the selected url from the array. More...
 
bool setMetadataCallback (void(*fn)(MetaDataType info, const char *str, int len), ID3TypeSelection sel=SELECT_ICY)
 
void setTimeout (int millisec)
 Sets the timeout of the URL Stream in milliseconds. More...
 
const char * toStr ()
 
- Public Member Functions inherited from audio_tools::AudioSource
virtual void begin ()=0
 Reset actual stream and move to root. More...
 
virtual bool isAutoNext ()
 Returns default setting go to the next. More...
 
virtual StreamnextStream (int offset)=0
 Returns next audio stream. More...
 
virtual StreampreviousStream (int offset)
 Returns previous audio stream. More...
 
virtual StreamselectStream (const char *path)=0
 Returns audio stream by path. More...
 
virtual StreamselectStream (int index)
 Returns audio stream at the indicated index (the index is zero based, so the first value is 0!) More...
 
virtual StreamsetIndex (int index)
 same as selectStream - I just prefer this name
 
virtual bool setMetadataCallback (void(*fn)(MetaDataType info, const char *str, int len), ID3TypeSelection sel=SELECT_ICY)
 
virtual void setTimeout (int millisec)
 Sets the timeout of Stream in milliseconds. More...
 
virtual void setTimeoutAutoNext (int millisec)
 Sets the timeout which is triggering to move to the next stream. - the default value is 500 ms.
 
virtual int timeoutAutoNext ()
 Provides the timeout which is triggering to move to the next stream.
 

Protected Attributes

AbstractURLStreamactual_stream = nullptr
 
int max = 0
 
const char * mime = nullptr
 
int pos = 0
 
bool started = false
 
const char ** urlArray
 
- Protected Attributes inherited from audio_tools::AudioSource
int timeout_auto_next_value = 500
 

Detailed Description

Audio Source which provides the data via the network from an URL.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

virtual void audio_tools::AudioSourceURL::begin ( )
inlineoverridevirtual

Setup Wifi URL.

Implements audio_tools::AudioSource.

◆ isAutoNext()

virtual bool audio_tools::AudioSourceURL::isAutoNext ( )
inlinevirtual

Returns default setting go to the next.

Reimplemented from audio_tools::AudioSource.

◆ nextStream()

Stream * audio_tools::AudioSourceURL::nextStream ( int  offset)
inlineoverridevirtual

Opens the next url from the array.

Implements audio_tools::AudioSource.

◆ previousStream()

Stream * audio_tools::AudioSourceURL::previousStream ( int  offset)
inlineoverridevirtual

Opens the Previous url from the array.

Reimplemented from audio_tools::AudioSource.

◆ selectStream() [1/2]

Stream * audio_tools::AudioSourceURL::selectStream ( const char *  path)
inlineoverridevirtual

Opens the selected url.

Implements audio_tools::AudioSource.

◆ selectStream() [2/2]

Stream * audio_tools::AudioSourceURL::selectStream ( int  idx)
inlineoverridevirtual

Opens the selected url from the array.

Reimplemented from audio_tools::AudioSource.

◆ setMetadataCallback()

bool audio_tools::AudioSourceURL::setMetadataCallback ( void(*)(MetaDataType info, const char *str, int len)  fn,
ID3TypeSelection  sel = SELECT_ICY 
)
inlinevirtual

Reimplemented from audio_tools::AudioSource.

◆ setTimeout()

void audio_tools::AudioSourceURL::setTimeout ( int  millisec)
inlinevirtual

Sets the timeout of the URL Stream in milliseconds.

Reimplemented from audio_tools::AudioSource.


The documentation for this class was generated from the following file: