English 中文(简体)
如何与音频 Quue API 播放一首歌, 以便找到歌曲节拍的准确时间
原标题:How to play a song with Audio Queue API in order to find the Accurate timings of the beat of the song

现在,我正在制作一个音乐项目, 我需要准确的计时。 我已经使用NSTimerr, NSdate, 但是在播放节拍( 即“ 坚固的” tik tok < / strong”) 时会拖延时间, 所以我决定使用音频 Que API 播放我在.wav 格式主包中的音效文件, 我花了两周时间才努力解决这个问题, 任何人都能帮我摆脱这个问题吗 。

问题回答

使用未压缩的声音和单一的音频队列, 持续运行。 不要在节拍之间阻止它。 相反, 将每个 Tock 声音( etc.) 的原始 PCM 样本混在一起, 开始切开精确数量的样本。 中间放静音( 零) 。 这将产生小米的准确时间 。





相关问题
Comparing two NSDates and ignoring the time component

What is the most efficient/recommended way of comparing two NSDates? I would like to be able to see if both dates are on the same day, irrespective of the time and have started writing some code that ...

Comparing dates in Cocoa

hi i want to know how to get current date? i want to compare current date with a date i m fetching from a plist files using following code. NSDate *expDate = [licenseDictionary objectForKey:@"Expires"...

Number of weeks in month

I have the following code: NSDate *dateNow = [[NSDate alloc] init]; NSTimeInterval timeDifference = [usersDate timeIntervalSinceDate:dateNow]; // Get the system calendar NSCalendar *sysCalendar = [...

get time between two times of the day

I ve already tried with NSDate but with no luck. I want the difference between for example 14:10 and 18:30. Hours and minutes. I Hope you can help me shouldn t be that complicated :)

Formatting an NSDate

I am pulling data from an RSS Feed. One of the keys in the feed is is a string representing the date and time the item was created. I am trying to convert this string value to an NSDate. The string ...

Get all days of any month with objective-c

A seemingly simple question...how can I return a list of days for any specified month? NSDate *today = [NSDate date]; //Get a date object for today s date NSCalendar *c = [NSCalendar currentCalendar];...

热门标签