• 大小: 49KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: 其他
  • 标签: AudioQueue  缓存  

资源简介

iOS声音采集与播放 利用AudioQueue,将声音Buffer缓存至内存(不用写文件),直接从缓存播放。 ARC项目,测试基于XCode5,iOS7可以正常跑通。没有处理异常流畅,每隔Byte大概只能缓存10来秒钟,这个由需要的人自己去优化。

资源截图

代码片段和文件信息

//
//  AppDelegate.m
//  AudioTest
//
//  Created by webseat2 on 13-10-12.
//  Copyright (c) 2013年 WebSeat. All rights reserved.
//

#import “AppDelegate.h“

@implementation AppDelegate

//@synthesize audioByte;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks disable timers and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources save user data invalidate timers and store enough application state information to restore your application to its current state in case it is terminated later. 
    // If your application supports background execution this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-23 10:36  AudioTest\
     文件        6148  2013-10-23 13:22  AudioTest\.DS_Store
     目录           0  2013-10-23 13:30  __MACOSX\
     目录           0  2013-10-23 13:30  __MACOSX\AudioTest\
     文件          82  2013-10-23 13:22  __MACOSX\AudioTest\._.DS_Store
     目录           0  2013-10-23 11:39  AudioTest\AudioTest\
     文件         357  2013-10-22 18:07  AudioTest\AudioTest\AppDelegate.h
     目录           0  2013-10-23 13:30  __MACOSX\AudioTest\AudioTest\
     文件         171  2013-10-22 18:07  __MACOSX\AudioTest\AudioTest\._AppDelegate.h
     文件        2032  2013-10-22 18:07  AudioTest\AudioTest\AppDelegate.m
     文件         171  2013-10-22 18:07  __MACOSX\AudioTest\AudioTest\._AppDelegate.m
     文件         753  2013-10-23 10:34  AudioTest\AudioTest\AudioConstant.h
     文件         171  2013-10-23 10:34  __MACOSX\AudioTest\AudioTest\._AudioConstant.h
     文件         200  2013-10-23 10:00  AudioTest\AudioTest\AudioConstant.m
     文件         171  2013-10-23 10:00  __MACOSX\AudioTest\AudioTest\._AudioConstant.m
     文件        1195  2013-10-14 08:46  AudioTest\AudioTest\AudioTest-Info.plist
     文件         343  2013-10-16 14:50  AudioTest\AudioTest\AudioTest-Prefix.pch
     文件         171  2013-10-16 14:50  __MACOSX\AudioTest\AudioTest\._AudioTest-Prefix.pch
     目录           0  2013-10-18 14:36  AudioTest\AudioTest\base.lproj\
     文件        4384  2013-10-18 14:36  AudioTest\AudioTest\base.lproj\Main.storyboard
     目录           0  2013-10-12 09:05  AudioTest\AudioTest\en.lproj\
     文件          45  2013-10-12 09:05  AudioTest\AudioTest\en.lproj\InfoPlist.strings
     目录           0  2013-10-23 13:30  __MACOSX\AudioTest\AudioTest\en.lproj\
     文件         171  2013-10-12 09:05  __MACOSX\AudioTest\AudioTest\en.lproj\._InfoPlist.strings
     目录           0  2013-10-12 09:05  AudioTest\AudioTest\Images.xcassets\
     目录           0  2013-10-12 09:05  AudioTest\AudioTest\Images.xcassets\AppIcon.appiconset\
     文件         333  2013-10-12 09:05  AudioTest\AudioTest\Images.xcassets\AppIcon.appiconset\Contents.json
     目录           0  2013-10-23 13:30  __MACOSX\AudioTest\AudioTest\Images.xcassets\
     目录           0  2013-10-23 13:30  __MACOSX\AudioTest\AudioTest\Images.xcassets\AppIcon.appiconset\
     文件         171  2013-10-12 09:05  __MACOSX\AudioTest\AudioTest\Images.xcassets\AppIcon.appiconset\._Contents.json
     目录           0  2013-10-12 09:05  AudioTest\AudioTest\Images.xcassets\LaunchImage.launchimage\
............此处省略40个文件信息

评论

共有 条评论