Giter VIP home page Giter VIP logo

freestreamer's Introduction

FreeStreamer

A streaming audio player for iOS and OS X.

Features

  • CPU-friendly design (uses 1% of CPU on average when streaming)
  • Multiple protocols supported: ShoutCast, standard HTTP, local files
  • Prepared for tough network conditions: adjustable buffer sizes, stream pre-buffering and restart on failures
  • Metadata support: ShoutCast metadata, IDv2 tags
  • Local disk caching: user only needs to stream a file once and after that it can be played from a local cache
  • Preloading: playback can start immediately without needing to wait for buffering
  • Record: support recording the stream contents to a file
  • Access the PCM audio samples: as an example, a visualizer is included

Documentation

See the FAQ (Frequently Asked Questions) in the wiki. We also have an API documentation available. The usage instructions are also covered in the wiki.

Is somebody using this in real life?

The short answer is yes! Check out our website for the reference applications.

Reporting bugs and contributing

For code contributions and other questions, it is preferrable to create a Github pull request. I don't have time for private email support, so usually the best way to get help is to interact with Github issues.

License

See LICENSE.txt for the license.

Donations

It is possible to use PayPal for donations.

freestreamer's People

Contributors

albin-joseph avatar alecgorge avatar avielg avatar caodingpeng avatar christophercotton avatar codeeagle avatar corymsmith avatar djnews24 avatar eirikurorri avatar gabek avatar jasenhuang avatar kirand777 avatar leandros avatar lkraider avatar lvialle avatar mrlittlewhite avatar msafder avatar muhku avatar pszot-concise avatar yousseb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freestreamer's Issues

AQ_BUFSIZ

With AQ_BUFSIZ = 32768 some radio stations (with .mp3 type) after playing around 3 minutes stop playing and doesn't return to play anymore

I tried a lot of different values of AQ_BUFSIZ and figure out, this is the best for everything:

static const size_t AQ_BUFSIZ = 45056;          // number of bytes in each audio queue buffer

And .mp3 and .aac radio stations works fine after that

Play/pause ignores every other one

I have this simple play/pause callback. The NSLog() properly alternates the play and pause printout, but the audio only starts on every other click, not with the corresponding label.

  • (IBAction)playOrPauseButtonPressed:(UIButton *)sender {
    if (self.playing) {
    [self.audio pause];
    self.playButton.imageView.image = [UIImage imageNamed:@"Play"];
    NSLog(@"Called pause");
    } else {
    [self.audio play];
    self.playButton.imageView.image = [UIImage imageNamed:@"Pause"];
    NSLog(@"Called play");
    }

    self.playing = !self.playing;
    }

So when the app first starts, I see my pause button, and press it. Console says paused and audio stops.

Now I hit play button. Console says called play and audio does not start.
Now I hit pause button and it says pause, but audio starts.

That cycle repeats.

Streamer not working

I'm just testing the streamer in my project by adding the following in the viewDidLoad of my viewController and there is no audio playing ...

FSAudioController *audioController = [[FSAudioController alloc] init];
    audioController.url = @"http://www.bassdrive.com/v2/streams/BassDrive3.pls";
    [audioController play];

AQ_BUFSIZ

Please change to 40960, my wrong

static const size_t AQ_BUFSIZ = 40960;          // number of bytes in each audio queue buffer

hard to find the best... I dont know why, but it problems between .mp3 or .aac

.aac have no problems with small AQ_BUFSIZ, but .mp3 have

and if AQ_BUFSIZ will be bigger than it need to be, then radio stations will fixate and stutter

Silence after play some time

I am already go in crazy, all previous week i tried different parameters for

#define kAudioStreamBitrateBufferSize 50
#define kAudioStreamDecodeQueueSize 32

static const size_t AQ_BUFFERS = 16;            // number of audio queue buffers we allocate
static const size_t AQ_BUFSIZ = 32768;          // number of bytes in each audio queue buffer
static const size_t AQ_MAX_PACKET_DESCS = 512;  // Maximum number of packets which can be contained in one buffer

looking for mistakes inside framework, and couldn't solve problem with playing!!! I'm really upset :(

for example this station:
http://skycast.su:2007/4466

after playing some time, maybe 1 min or 10 min, sound just disappear, audio buffer seems like still working, but I have no sound any more...

and this station:
http://87.245.139.246:8000/sport64

lags lags and lags, every few seconds stutter...

I need some help with it, I already don't have any ideas :(

Incompatible with ARC project

I'm using two minimal single view projects for testing with the following code:

FSAudioStream *audioStream = [[FSAudioStream alloc] init];
[audioStream playFromURL:[NSURL URLWithString:@"http://www.example.com/audio_file.mp3"]];

It works ok in a non ARC project, music plays. But it doesn't in a ARC project, nothing happens (no errors). I have set the -fno-objc-arc flag for FSAudioStream in order to be able to compile, but as I said, music doesn't play even if I can compile.

ARC compatibility is crucial, in my opinion. Any way to fix it? Thanks.

playFromURL No reconnect

If I use this code for stream a mp3 its worked fine but if the Internet connection lost for a second the stream never reconnecting...

FSAudioStream *audioStream = [[FSAudioStream alloc] init];
[audioStream playFromURL:[NSURL URLWithString:@"http://www.example.com/audio_file.mp3"]];

Now playing option and play stop button

hello, can you add now playing option when we play any stream and go back to station list ? there should now playing (button etc) and go to current playing station ? also play and stop button can be one instead two ? so it will take less space and look nice ? thank you much

Sinus Waves

Is there any way to get any sinus wave data to draw waveform on Objective-C side ?

Not ended playing mp3 while audio is stoped by audioQueueBuffersEmpty

Hi thank for such a good job!

I've tried to play an mp3 from server, for an audio ad to play before radio streaming is played. The audio mp3 file is 20 secs long and by 18 or 19 secs it is abruptly stoped and the only logged reason is -> audioQueueBuffersEmpty(): closing the audio queue

The audio file is fine and works perfect on android so it may have not to be with network and file is not corrupted.

Please help me solve this situation.
Thanks in advance.

This is the log:
START:
void astreamer::Audio_Stream::close(): enter
void astreamer::Audio_Stream::close(): leave
void astreamer::Audio_Stream::open(): HTTP stream opened, buffering...
2014-05-08 16:07:08.210 Irradia[1982:60b] kFsAudioStreamBuffering
Starting the startup watchdog, period 30 seconds
2014-05-08 16:07:08.377 Irradia[1982:60b]
2014-05-08 16:07:08.379 Irradia[1982:60b]
Read 964 bytes
A regular HTTP stream
icy-metaint: 0
Content-type: audio/mpeg
kAudioFileMP3Type detected
virtual void astreamer::Audio_Stream::streamIsReadyRead(): audio file stream opened.
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 964 bytes
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
No audio queue, creating
found property '102102109116'
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
found property '100102109116'
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
srcFormat, bytes per packet 0
found property '114101100121'
void astreamer::Audio_Queue::cleanup(): warning: attempt to cleanup an uninitialized audio queue. return.
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes

****** splited logs *** .....
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
calling AudioConverterFillComplexBuffer
16384 output bytes available for the audio queue
The stream started to play, canceling the watchdog
2014-05-08 16:07:08.599 Irradia[1982:60b] kFsAudioStreamPlaying
got data. bytes: 65536 packets: 1
int astreamer::Audio_Queue::handlePacket(const void , AudioStreamPacketDescription *): enter
int astreamer::Audio_Queue::handlePacket(const void *, AudioStreamPacketDescription *): skipped enqueueBuffer AQ_BUFSIZ - m_bytesFilled 65536, packetSize 65536
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes
*
* splited logs *********

Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
calling AudioConverterFillComplexBuffer
16384 output bytes available for the audio queue
got data. bytes: 65536 packets: 1
int astreamer::Audio_Queue::handlePacket(const void *, AudioStreamPacketDescription *): enter
int astreamer::Audio_Queue::enqueueBuffer(): enter
waiting for buffer 0
static void astreamer::Audio_Queue::audioQueueIsRunningCallback(void *, AudioQueueRef, AudioQueuePropertyID): enter
audio queue running!
findQueueBuffer 0
int astreamer::Audio_Queue::handlePacket(const void *, AudioStreamPacketDescription *): enter
int astreamer::Audio_Queue::handlePacket(const void *, AudioStreamPacketDescription *): skipped enqueueBuffer AQ_BUFSIZ - m_bytesFilled 65536, packetSize 65536
Read 1024 bytes
Not an ICY stream; calling the delegate back
streamHasBytesAvailable: 1024 bytes
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
streamDataCallback: inNumberBytes 627, inNumberPackets 1
Less than 32 packets queued, returning...
Read 1024 bytes

****** splited logs **********

findQueueBuffer 2
virtual void astreamer::Audio_Stream::audioQueueBuffersEmpty(): enter
virtual void astreamer::Audio_Stream::audioQueueBuffersEmpty(): closing the audio queue
void astreamer::Audio_Queue::stop(bool): enter
void astreamer::Audio_Queue::stop(bool): leave
virtual void astreamer::Audio_Stream::audioQueueBuffersEmpty(): leave
static void astreamer::Audio_Queue::audioQueueIsRunningCallback(void *, AudioQueueRef, AudioQueuePropertyID): enter
2014-05-08 16:07:27.827 Irradia[1982:60b] kFsAudioStreamStopped

2014-05-08 16:07:34.405 Irradia[1982:60b]
void astreamer::Audio_Stream::close(): enter
Releasing audio queue

new issue while parsing custom pls file

I created my own .pls file with the help of :
http://www.scvi.net/pls.htm

I created my .pls file with the content :

[playlist]
numberofentries=2
File1=http://10.0.1.12/mohit/audio11.mp3
Title1=Title 1
Length1=4
File2=http://10.0.1.12/mohit/audio12.mp3
Title2=Title 2
Length2=5
Version=2

The streamer does not seem to accept this. The log message printed out is :

void astreamer::Audio_Stream::open(): HTTP stream opened, buffering...
void astreamer::Audio_Stream::closeAndSignalError(int): error 1
void astreamer::Audio_Stream::close(): enter
void astreamer::Audio_Stream::close(): leave
streamHasBytesAvailable: 351 bytes
virtual void astreamer::Audio_Stream::streamHasBytesAvailable(UInt8 *, UInt32): stray callback detected!

However, opening the pls file in iTunes works absolutely as expected...

iOS 7 updates?

Are you planning to update this for iOS 7...replacing the deprecated methods?

Don't rewrite Tags

If you've assigned a tag once, don't reassign the same tag to another commit.

The library has been updated, but you can't update through CocoaPods, because it's recognized as the same version.

EXT_BAD_ACCESS on MEMCPY

Hello, thanks for your great library for streaming. It have almost all features I need, but it crash some times when I call [_streamer playFromURL:(url *)]
It doesn't matter of URL or number of times I call this method, It can happens if I call it ones or after ten times. But most often it happens on iOS 7.

I receive error EXT_BAD_ACCESS in audio_queue.cpp with method:

// copy data to the audio queue buffer
    AudioQueueBufferRef buf = m_audioQueueBuffer[m_fillBufferIndex];
    memcpy((char*)buf->mAudioData + m_bytesFilled, data, packetSize); // HERE EXT_BAD_ACCESS

I tried to change all this parameters but unuseful
AQ_BUFFERS
AQ_BUFSIZ
AQ_MAX_PACKET_DESCS

Can you help me?

Buffer Size Error?

I'm trying tro stream an AACP stream.
On simulator is set AQ_BUFSIZ = 4026 and work fine... (2048 don't play)

But on iPhone 5 no, something on device? I mean, some aditional setup for device?

`initWithUrl:` parameter type inconsistent across classes.

FSAudioStream takes an NSURL, which is in my opinion correct. But FSAudioController takes an NSString. There may be other similar in other areas of the API.

I'm happy to make the changes myself and make a pull request if you like.

Unable to trace buffer period while playing

I want to trace buffer period. When music play by live streaming url in between some time buffering happen due to some bad streaming or low internet speed or any other case. After some time streaming resume and play perfectly.
Now my question is how can I trace that buffering period.So I can set Indicator while app is on buffer state and hide indicator when it's come back to playing mode.

Is it possible in your demo app?

Can please give me some idea.

Get station names from the stream

Hi, many thanks for this great streamer!

My question is - how can I get the stations name from the stream?
I noticed, that some playlists contains the station name (for example PLS from di.fm).

The first point - would be great to add some notification that you got station name.
Second - some stations have no playlists with name inside, but iTunes show the name for them correctly. For example, http://stream21.group-network.net:9012

Thanks in advance,

Default Control not display while lock iPhone screen.

Hi Muhku,

I have used your code in my application and it's work perfect.

But I am facing some problems.

When I lock my iPhone with top of the lock button controller with (Volume slider,Pause button, Play button) not display in iPhone lock screen!!

Is there any setting or code that I have to written for display controller while user lock iPhone.

Thanks
Keyur Bhalodiya

Keep allocate memory after reach EOF of mp3 file

I'm trying to use this class to play mp3 files from internet.

When the AudioStream reaches EOF of the mp3 file, and turns it state to kFsAudioStreamStopped, but it won't actually stop.
The audioPlaybackRunloop keep allocate new memory for nothing, unless an explicite [AudioController stop] is called.

On simulator, the App eat up 3G of memory until the memory is filled.


It looks like this streamer lib is not designed for play single audio file, but a .pls playlist. Are you willing to improve it to a more generalized form?

Thanks a lot for this awesome lib. Good work.

Some way from NSInputStream?

Awesome Work.
I was looking for some way to playback from NSINputstream but i not find this?.
there some way to do this?.

Rebuffering indication issue

Hi guys,

One more note: I often listen the stream over 3G / Edge and usually I have lost connection - but the issue there that streamer not inform me about "Buffering status".

I think it should send a notification "Buffering", and then error or playing statuses.

What do you think? Thanks in advance.

aka 'unsigned long'

I receive the following warning

/astreamer/audio_queue.cpp:326:58: Implicit conversion loses integer precision: 'UInt64' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long')

// copy data to the audio queue buffer
AudioQueueBufferRef buf = m_audioQueueBuffer[m_fillBufferIndex];
memcpy((char*)buf->mAudioData + m_bytesFilled, data, packetSize);

AS_RELAX_CONTENT_TYPE_CHECK

Hello again :)

Even if I set

_audioStreamer.strictContentTypeChecking = NO;

It doesn't work while I'm not set

#define AS_RELAX_CONTENT_TYPE_CHECK 0

in audio_stream.cpp

Is it ok? how It suppose to work?

AudioFileStreamOpen 'streamDataCallback' sometimes only called once

On a particular audio/mpeg stream the streamer will 7 out of 10 times play correctly and the StreamDataCallback is constantly receiving the byte data from the stream but everynow and again the callback is only called once and then never again and the streamer is still in the Playing State.

My Debug Log is

----void astreamer::Audio_Stream::open(): HTTP stream opened, buffering...
streamHasBytesAvailable: 1729 bytes
kAudioFileMP3Type detected
virtual void astreamer::Audio_Stream::streamIsReadyRead(): audio file stream opened.
streamHasBytesAvailable: 2047 bytes
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
static void astreamer::Audio_Stream::propertyValueCallback(void *, AudioFileStreamID, AudioFileStreamPropertyID, UInt32 *)
streamDataCallback: inNumberBytes 1881, inNumberPackets 9


You can see the streamDataCallback only called the once, I need to either find where the issue is or gracefully handle the situation.

Suggestions?

Unsupported format

Few minutes ago I decided to update my App according to the changes you made to your App a day ago. It compiles and runs with no problems. The problem is when trying to actually play a radio, I get "Unsupported format" (FSAudioStream: Unsupported format error: http://184.107.210.203:7154). I downloaded the FreeStreamer sample, I get the same error. Before the changes, it was working just fine.

I'm using the latest version of Xcode. My device is an iPhone 5s.

Jaime,

stuck on buffering state after interuption end

Hi,
Thanks for library firstly,
Interruptions with phone calls and any others phone operation is successfully handled and working but when my app was interrupted with other audio app, on resume it stuck on buffering state.
I also added and uncomment this lines but still not working.

[[AVAudioSession sharedInstance] setActive:YES error:nil];
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

Thank you,

Storyboards

Hey there,

Bit of a noobish question as I am somewhat of a noob. Do you happen to have a project using Storyboards with this integrated or some information on how this could be done?

Hamual

Need a way to set the default Content-Type if no one is found

Some carriers have problems and send incorrect MIME types like "plain/text" over 3G even when the server sends "audio/aacp" or whatever. It sounds crazy, but believe me, it happens.

Thus I am forced to define AS_RELAX_CONTENT_TYPE_CHECK. The problem is that it uses "audio/mpeg" by default. I only play two streams, and I know one of them is "audio/aacp". I need a way to set the default MIME type to use in case no one is detected and AS_RELAX_CONTENT_TYPE_CHECK is defined. And I need to be able to change that even several times for the same FSAudioStream instance (so it's not enough to have that parameter in the init method.

Something like this:

FSAudioStream *stream = [[FSAudioStream alloc] init];
stream.defaultContentType =  @"audio/aacp" // Or maybe kAudioFileAAC_ADTSType instead of @"audio/aacp"?

Do you think it may be an interesting feature?

Resume player after call end in iPhone and Play/Pause control from the default locked screen (Out side of the application).

Hi Muhku,

I am using your code for playing live streaming audio file in my application. It's one Radios station.

You code works perfect but I have some issue with that. Can you please guide for the same.

  1. When audio play in application and I lock my iPhone from top of the lock button at that time current song information display with volume slider controller and 3 buttons forward,backward and pause button. When I press pause button streaming not stopped at that time I mean can I control music streaming from that button. I want to pause and play music using that button.

  2. While iPhone locked form the top of lock button and I received call by some one after call end, Is it possible to Resume music automatically.
    Currently music not Resume automatically if iPhone locked from top locked button. It is given message some thing like "Network error". I have to Resume music manually by open the application and press Play button.

I am stuck it would be grate if you help to me for solve my problem.

Thanks in Advance.

Regards,
Keyur Bhalodiya
Sr. iOS Developer

Network error if paused too long

My customer is reporting that if they pause the play and leave the app, then come back a few minutes later they're getting an error (your kFsAudioStreamErrorNetwork to be specific). I'm guessing this somehow relates to buffering?

He also says, "In fact, I'd say the issue could be replicated if you have song 1 on. hit pause. Go away until song 1 is over, then try to go back to hear song 2." I haven't noticed that one specifically but it's another data point.

Am I supposed to be doing something to handle this specifically? I didn't notice it in the demo app but it would be easy to not realize what I was looking at.

Error while installing from cocoapods

I get the following error when installing from cocoa pods 👍

ndefined symbols for architecture i386:
  "std::string::c_str() const", referenced from:
      astreamer::HTTP_Stream::parseHttpHeadersIfNeeded(unsigned char*, long) in libPods.a(http_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::string::empty() const", referenced from:
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::string::length() const", referenced from:
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::string::substr(unsigned long, unsigned long) const", referenced from:
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::string::compare(char const*) const", referenced from:
      astreamer::Audio_Stream::audioStreamTypeFromContentType(std::string) in libPods.a(audio_stream.o)
  "std::string::compare(unsigned long, unsigned long, char const*) const", referenced from:
      astreamer::Audio_Stream::streamIsReadyRead() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::allocator<char>::allocator()", referenced from:
      -[FSAudioStreamPrivate setDefaultContentType:] in libPods.a(FSAudioStream.o)
      astreamer::Audio_Stream::Audio_Stream() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::allocator<char>::~allocator()", referenced from:
      -[FSAudioStreamPrivate setDefaultContentType:] in libPods.a(FSAudioStream.o)
      astreamer::Audio_Stream::Audio_Stream() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::string::append(char const*)", referenced from:
      astreamer::HTTP_Stream::parseHttpHeadersIfNeeded(unsigned char*, long) in libPods.a(http_stream.o)
  "std::string::push_back(char)", referenced from:
      astreamer::HTTP_Stream::parseHttpHeadersIfNeeded(unsigned char*, long) in libPods.a(http_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
      -[FSAudioStreamPrivate setDefaultContentType:] in libPods.a(FSAudioStream.o)
      astreamer::Audio_Stream::Audio_Stream() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)", referenced from:
      astreamer::Audio_Stream::streamIsReadyRead() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::contentType() in libPods.a(http_stream.o)
      __gnu_cxx::new_allocator<std::string>::construct(std::string*, std::string const&) in libPods.a(http_stream.o)
      std::vector<std::string, std::allocator<std::string> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, std::string const&) in libPods.a(http_stream.o)
      void std::_Construct<std::string, std::string>(std::string*, std::string const&) in libPods.a(http_stream.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()", referenced from:
      astreamer::HTTP_Stream::HTTP_Stream() in libPods.a(http_stream.o)
      astreamer::HTTP_Stream::parseHttpHeadersIfNeeded(unsigned char*, long) in libPods.a(http_stream.o)
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()", referenced from:
      -[FSAudioStreamPrivate setDefaultContentType:] in libPods.a(FSAudioStream.o)
      astreamer::Audio_Stream::~Audio_Stream() in libPods.a(audio_stream.o)
      astreamer::Audio_Stream::streamIsReadyRead() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::HTTP_Stream() in libPods.a(http_stream.o)
      astreamer::HTTP_Stream::~HTTP_Stream() in libPods.a(http_stream.o)
      astreamer::HTTP_Stream::parseHttpHeadersIfNeeded(unsigned char*, long) in libPods.a(http_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
      ...
  "std::string::operator=(char const*)", referenced from:
      astreamer::HTTP_Stream::open(astreamer::HTTP_Stream_Position const&) in libPods.a(http_stream.o)
  "std::string::operator=(std::string const&)", referenced from:
      astreamer::Audio_Stream::setDefaultContentType(std::string&) in libPods.a(audio_stream.o)
      astreamer::Audio_Stream::streamIsReadyRead() in libPods.a(audio_stream.o)
      astreamer::HTTP_Stream::parseICYStream(unsigned char*, long) in libPods.a(http_stream.o)
      std::vector<std::string, std::allocator<std::string> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, std::string const&) in libPods.a(http_stream.o)
      std::string* std::__copy_backward<false, std::random_access_iterator_tag>::__copy_b<std::string*, std::string*>(std::string*, std::string*, std::string*) in libPods.a(http_stream.o)
  "std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from:
      std::_Rb_tree_iterator<std::pair<__CFString const* const, __CFString const*> >::operator--() in libPods.a(http_stream.o)
      std::_Rb_tree_iterator<std::pair<__CFString const* const, __CFString const*> >::operator--() in libPods.a(id3_parser.o)
  "std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from:
      std::_Rb_tree_iterator<std::pair<__CFString const* const, __CFString const*> >::operator++() in libPods.a(FSAudioStream.o)
      std::_Rb_tree_iterator<std::pair<__CFString const* const, __CFString const*> >::operator++() in libPods.a(http_stream.o)
      std::_Rb_tree_iterator<std::pair<__CFString const* const, __CFString const*> >::operator++() in libPods.a(id3_parser.o)
  "std::__throw_length_error(char const*)", referenced from:
      std::vector<AudioStreamPacketDescription*, std::allocator<AudioStreamPacketDescription*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<AudioStreamPacketDescription**, std::vector<AudioStreamPacketDescription*, std::allocator<AudioStreamPacketDescription*> > >, AudioStreamPacketDescription* const&) in libPods.a(audio_queue.o)
      std::vector<unsigned char, std::allocator<unsigned char> >::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char const&) in libPods.a(http_stream.o)
      std::vector<std::string, std::allocator<std::string> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, std::string const&) in libPods.a(http_stream.o)
      std::vector<unsigned char, std::allocator<unsigned char> >::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char const&) in libPods.a(id3_parser.o)
  "std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
      std::_Rb_tree<__CFString const*, std::pair<__CFString const* const, __CFString const*>, std::_Select1st<std::pair<__CFString const* const, __CFString const*> >, std::less<__CFString const*>, std::allocator<std::pair<__CFString const* const, __CFString const*> > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<__CFString const* const, __CFString const*> const&) in libPods.a(http_stream.o)
      std::_Rb_tree<__CFString const*, std::pair<__CFString const* const, __CFString const*>, std::_Select1st<std::pair<__CFString const* const, __CFString const*> >, std::less<__CFString const*>, std::allocator<std::pair<__CFString const* const, __CFString const*> > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<__CFString const* const, __CFString const*> const&) in libPods.a(id3_parser.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

kFsAudioStreamFailed vs kFsAudioStreamStopped

Hi guys,

There is a question: should it be StreamStop after StreamFailed?

I'm testing the app with no internet connection and logic for now seems like:
1/ kFsAudioStreamRetrievingURL
2/ kFsAudioStreamBuffering
3/ kFsAudioStreamFailed
4/ kFsAudioStreamStopped
5/ audioStreamErrorOccurred:(NSNotification *)notification

The 3 and 4 are interesting for me - because I have catch the 4 if user press stop button (normal stop), and same if stream fails.
I think it would be great if stream failed - then skip 4/.

The stream should move to the failed state if too many bufferings occur within a time interval

As per the title.

We should have configurable thresholds for this. Usually on a very bad connection the stream starts to fluctuate between the playing and the buffering state ("stuttering"). The user hears short moments of silence. A better way would be to track the number of bufferings in the last x seconds. So let's say if we have more than 5 bufferings within the last 10 seconds, the stream should fail (for example). We could also try to automatically restart the stream for more user-friendly behaviour.

Volume Changes Programatically

Hi,
Thanks for app, it helps me really much. I got a problem, can you help me?
I want to change volume but i coudn't make it. I tried to change AvSession's volume but it didn't recognize the setVolume method. Do you have any volume property at somewhere?

Thanks,

Streaming music title

Hi, thanks for great library!

I have tested FreeStreamer library with latin alphabet for StreamTitle (English alphabet) and everything worked good,
but if use Cyrillic alphabet (Russian alphabet) and the StreamTitle is Null.

StreamTitle - the title of streaming music. (Music which is playing online)

What can cause this issue, thanks.

Problem seeking

I've tried to track down the exact source here ... everything appears to be correct; however when attempting to seek ... the stream simply restarts. I've logged/traced everywhere I can think of and, again, on the surface everything looks great in terms of the unsigned int being passed along.

One thing particularly odd is the elapsed time display shows the proper seek time after the stream restarts. Say I seek from 0:10 to 0:25 ... it will show 0:25 despite starting back at 0:00. And continue to count up as though the seek was successful.

The audio file in question is an mp3, though I don't suspect that would matter ... right?

Kind of at a loss here; so I was hoping to get some ideas of what/where the problem may be.

Otherwise, this has worked great!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.