Git Product home page Git Product logo

douaudiostreamer's People

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  avatar  avatar

douaudiostreamer's Issues

Complier erros with Xcode 6

Hi
There is some library got updated in OpenGL so with x code 6 it is not compiling the source.
please check got resolved soon.

screen shot 2014-10-01 at 11 23 47 am
)

Option to play local audio files

It would be great to have the option to pass a URL to a local file.
Writing apps supporting On and offline mode would be great this way.

避免再次缓冲问题

既然你已经提供了DOUAudioStreamerRemoveCacheOnDeallocation这个option,那么第二播放的时候是否就可以直接播放本地的呢?

App crashes when phone call ends iOS 7

The app crashes when the phone calls end with the "failed to get interruption type" NSAssert message. I believe this is because of the AudioSession APIs being deprecated in iOS 7. Is there a quick fix for this or will there be a update soon expected?

能否使用DouAudioStreamer播放AAC格式的音频数据

目前在做一个视频播放器,音频部分是AAC格式的数据,想请问一下是否可以使用DouAudioStreamer来播放NSData,而不是播放一个音频文件,如果可以的话,麻烦告知一下方法,不胜感激!

Adding tracks to local library

Great project - thanks for making this! I know you are planning to release documentation, but what is the protocol for adding files to the local music library? The demo project crashes when you select "Local Music Library" because there is nothing in the musicLibraryTracks array.

后台播放音乐,来电话,挂断电话就崩溃了

崩溃停在了DOUAudioEventLoop.m文件的- (BOOL)_handleEvent:(event_type)event withStreamer:(DOUAudioStreamer **)streamer方法中的:
NSAssert(status == noErr, @"failed to activate audio session");
这个断言失败,status 不等于noErr, 打印出来了failed to activate audio session

Support seeks to a time position

允许用户拖动播放进度条,调整audiofile的播放进度
看了一下代码,加这个功能并不是很容易,貌似你不打算支持这个功能?

Custom visualizer - output level

Not really an issue - just a question:

I'm supporting both local files and streaming, and the custom visualizer I built relies on the "averagePowerForChannel" method from the AVAudioPlayer to update my metering (for local files). Obviously it's not this simple when streaming, but I'm having trouble finding a way to get a range of values from the streamer to use for output metering. Any range of values will do, and the mapping to dB values shouldn't be an issue.

If anyone has any thoughts on getting an output level range they would be greatly appreciated, and I think this could help bridge the gap for local players and streamers when using custom visualizers.

Thanks

Hdhbeind

Hdnmrifjnhgsfjdnhggsoqihhrjdjejnh

不能后台播放

//后台播放音频设置
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:YES error:nil];
[session setCategory:AVAudioSessionCategoryPlayback error:nil];

//让app支持接受远程控制事件
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

无效

如何切换播放使用扬声器或者听筒

我使用以下方法没用:

UInt32 audioRouteOverride = !isSpeaker ? kAudioSessionOverrideAudioRoute_None:kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(audioRouteOverride), &audioRouteOverride);
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setActive:YES error:nil];

第一次播放报错,第二次就可以播放了

http://dfs.joyotime.com/fishsaying/M00/00/1E/dhrK01IR3zOAEi_VAAHavDmh1qQ467.aac
第一次状态了LOG:
2013-08-19 17:24:04.675 FishSaying[10799:c07] 4
2013-08-19 17:24:04.675 FishSaying[10799:c07] 4
2013-08-19 17:24:04.741 FishSaying[10799:c07] 4
2013-08-19 17:24:04.742 FishSaying[10799:c07] 4
2013-08-19 17:24:04.859 FishSaying[10799:c07] 4
2013-08-19 17:24:04.860 FishSaying[10799:c07] 4
2013-08-19 17:24:05.230 FishSaying[10799:c07] 4
2013-08-19 17:24:05.230 FishSaying[10799:c07] 4
2013-08-19 17:24:05.272 FishSaying[10799:c07] 4
2013-08-19 17:24:05.272 FishSaying[10799:c07] 4
2013-08-19 17:24:05.311 FishSaying[10799:c07] 4
2013-08-19 17:24:05.311 FishSaying[10799:c07] 4
2013-08-19 17:24:05.312 FishSaying[10799:c07] 4
2013-08-19 17:24:05.312 FishSaying[10799:c07] 4
2013-08-19 17:24:05.313 FishSaying[10799:c07] 4
2013-08-19 17:24:05.313 FishSaying[10799:c07] 4
2013-08-19 17:24:05.354 FishSaying[10799:c07] 5
2013-08-19 17:24:05.358 FishSaying[10799:c07] 5

第二次:
2013-08-19 17:24:04.675 FishSaying[10799:c07] 0

AUIOClient_StartIO failed (560557684)

Hi, want to say thanks for this great project, hope it will continue growing!
It works well, but found one annoying bug:
when DOUAudioStreamer object starts playing track and at the same moment you receive a call, or start another music application and play audio, it will log an error: "ERROR: [com.douban.audio-streamer.event-loop] 1207: AUIOClient_StartIO failed (560557684)" and will enter to undefined state, it will not respond to any action: play,pause, stop or reset.

不支持AAC格式的音频文件

不支持AAC或者M4A等压缩音频格式。我们在做一个关于录音的APP,音频进行过了压缩成AAC编码,导致无法正常播放。

Unable to continue paused song after lock - unlock of device

Issue: After I start streaming a music from server, I paused music on my app. I locked the device by pressing power button. Once again I logged-in into system after entering my passcode and tried to start music streaming again. But it is throwing error DOUAudioStreamerError. I'm able to see this same issue in sample app DOUASDemo.

This issue occurs only when I lock and unlock the device. Otherwise it is working fine. Normally application should continue streaming from where it left after I unlock the device.

Do we have any workaround for this? I guess this issue should be resolved.

events from control center

how can i show audio track in control center, when track is playing. and how can i handle event from control center(play/pause,next,previous)? thanks)

DOUAudioDecoder issue

Hi guys,

This method

  • (DOUAudioDecoderStatus)decodeOnce
    in the DOUAudioDecoder.m

I found sometimes this method return DOUAudioDecoderEndEncountered, but the audio just buffer.

DOUAudioDecoder.m
Line 386:
if (ioOutputDataPackets == 0) {
[_lpcm setEnd:YES];
pthread_mutex_unlock(&_decodingContext.mutex);
return DOUAudioDecoderEndEncountered;
}

Why the ioOutputDataPackets == 0, but audio just buffer?

Thank you.

在线播放aac音频文件时无法完整播放,获取的时间长度也会小于原始长度

我在测试aac音频在线播放时,遇到了如上问题,但是播放mp3文件是没有问题的。
我发现,播放aac文件时,在DOUAudioPlaybackItem类中,
status = AudioFileGetProperty(_fileID, kAudioFilePropertyEstimatedDuration, &size, &estimatedDuration);
计算的播放时长不是整个音频文件的,而是当前已下载的文件的时间长度。
不知道有没有办法能够像mp3那样,虽然文件只下载了一部分,也能够获取正确的时长,并且完整的播放完成。

Undefined symbol

Hello Douban,

After, following your instructions to add the source files src into my application, i am getting below error,

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_DOUMPMediaLibraryAssetLoader", referenced from:
      objc-class-ref in DOUAudioFileProvider.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

IDE : XCode 6.0
SDK : iOS 8.0

Researched lot about this. No solution yet. Do i need to import any frameworks or libs for this?

在播放的音频文件极短时存在的一个崩溃问题

你好!
在使用的过程中,我发现,当播放的音频文件非常短时,会导致程序崩溃,经过跟踪我发现了问题所在:
文件: DOUAuidoPlaybackItem.m
问题代码块:

static OSStatus audio_file_read(void *inClientData,
SInt64 inPosition,
UInt32 requestCount,
void *buffer,
UInt32 *actualCount)
{
__unsafe_unretained DOUAudioPlaybackItem *item = (__bridge DOUAudioPlaybackItem *)inClientData;
if ([item filePreprocessor] == nil) {
memcpy(buffer, (uint8_t *)[[item mappedData] bytes] + inPosition, requestCount);
}
else {
NSData *input = [NSData dataWithBytesNoCopy:(uint8_t *)[[item mappedData] bytes] + inPosition
length:requestCount
freeWhenDone:NO];
NSData *output = [[item filePreprocessor] handleData:input offset:inPosition];
memcpy(buffer, [output bytes], [output length]);
}
*actualCount = requestCount;
return noErr;
}

memcpy(buffer, (uint8_t *)[[item mappedData] bytes] + inPosition, requestCount);这段代码未考虑溢出的问题。
增加如下判断就可以了:
NSInteger len =[item mappedData].length;
if (requestCount > len) {
requestCount = len - inPosition;
}

播放进度

如果有播放进度 修改 这个功能就更完美了.

auto play from cache audio file.

I find this framework cache the remote audio file when play, but why i play next with remote url, it couldn't play from cached audio file instead of playing from remote url.

m4a Files not Streaming Correctly

When I try to stream remote mp3 audio, this library works perfectly -- The audio buffers and then starts playing as the rest of the file loads ahead of it; However, when I try to stream m4a (aac) files, it won't start playing until it loads the entire file.

Edit:
Interestingly, small m4a files stream fine. This issue only occurs with large m4as (I was testing with 10 minutes of audio -- 14.8MB). Similarly large mp3s stream perfectly.

Crash in AudioConverterNew

When moving source data or example into a different project app crashes every time song starts. It just throughs exception in following line:

OSStatus status = AudioConverterNew(&inputFormat, &_outputFormat, &_audioConverter);

when _createAudioConverter method is called.

Update 1: Only appears when streaming (with not local items).

音频解码失败的错误

从百度分享那里取来的下载链接,如下:
http://pan.baidu.com/share/link?shareid=533818&uk=2032859066

然后右键拷贝出来具体文件的下载地址.就像这样的地址:

http://d.pcs.baidu.com/file/2d9cad8a977bdd5ffc05282aa9ca3cce?fid=2032859066-250528-2190128000&time=1369982858&sign=FDTAR-DCb740ccc5511e5e8fedcff06b081203-L0%2F3dQiS2BDMaH%2BglFbDqrj1AcQ%3D&rt=sh&expires=8h&r=811992230&sh=1&response-cache-control=private

但是通过DOUAudioStreamer 读取 会报解码错误. 无法播放

但是后台依旧正在在下载这个文件.

或者像这样的音频下载地址:
http://files.parse.com/2d7cec80-f800-4a36-82dd-d9a9fc59084e/366ba502-1328-4f5c-9360-5934f2312728-file

有时候成功,有时候失败,这是为什么....

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.