tumtumtum / StreamingKit

A fast and extensible gapless AudioPlayer/AudioStreamer for OSX and iOS (iPhone, iPad)
Other
2.43k stars 525 forks source link

Streaming with Multipeer Connectivity #136

Open luciansvnc opened 10 years ago

luciansvnc commented 10 years ago

Hello! I am trying to stream music from one device to another using StreamingKit and Multipeer Connectivity. I intercepted the audio frames using:

[audioPlayer appendFrameFilterWithName:@"MyCustomFilter" block:^(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UInt32 frameCount, void* frames) { ... }];

After this I used and output stream to send data to the other device. My next step is to parse the stream data and play it on the client side using StreamingKit. I spent lots of time trying to achieve this but with no luck. Can you please tell me a way to do this? Thank you very much!

ghost commented 9 years ago

Did you succeed doing this? I just got started with StreamingKit and my plan was to write a subclass of STKDataSource (like STKMCDataSource) that reads data from a multipeer connection. But maybe there is a better way?

luciansvnc commented 9 years ago

Sorry I didn't manage to succeed. CoreAudio is a very dark side of iOS Programming and it needs years to master it. :D