/*
* Interface to MP3 LAME encoding engine
*
* Copyright (c) 1999 Mark Taylor
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* $Id: lame.h,v 1.189.2.1 2012/01/08 23:49:58 robert Exp $ */
#ifndef LAME_LAME_H
#define LAME_LAME_H
/* for size_t typedef */
#include <stddef.h>
/* for va_list typedef */
#include <stdarg.h>
/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */
#include <stdio.h>
#if defined(__cplusplus)
extern "C" {
#endif
typedef void (*lame_report_function)(const char *format, va_list ap);
#if defined(WIN32) || defined(_WIN32)
#undef CDECL
#define CDECL __cdecl
#else
#define CDECL
#endif
#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1
typedef enum vbr_mode_e {
vbr_off=0,
vbr_mt, /* obsolete, same as vbr_mtrh */
vbr_rh,
vbr_abr,
vbr_mtrh,
vbr_max_indicator, /* Don't use this! It's used for sanity checks. */
vbr_default=vbr_mtrh /* change this to change the default VBR mode of LAME */
} vbr_mode;
/* MPEG modes */
typedef enum MPEG_mode_e {
STEREO = 0,
JOINT_STEREO,
DUAL_CHANNEL, /* LAME doesn't supports this! */
MONO,
NOT_SET,
MAX_INDICATOR /* Don't use this! It's used for sanity checks. */
} MPEG_mode;
/* Padding types */
typedef enum Padding_type_e {
PAD_NO = 0,
PAD_ALL,
PAD_ADJUST,
PAD_MAX_INDICATOR /* Don't use this! It's used for sanity checks. */
} Padding_type;
/*presets*/
typedef enum preset_mode_e {
/*values from 8 to 320 should be reserved for abr bitrates*/
/*for abr I'd suggest to directly use the targeted bitrate as a value*/
ABR_8 = 8,
ABR_320 = 320,
V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/
VBR_10 = 410,
V8 = 420,
VBR_20 = 420,
V7 = 430,
VBR_30 = 430,
V6 = 440,
VBR_40 = 440,
V5 = 450,
VBR_50 = 450,
V4 = 460,
VBR_60 = 460,
V3 = 470,
VBR_70 = 470,
V2 = 480,
VBR_80 = 480,
V1 = 490,
VBR_90 = 490,
V0 = 500,
VBR_100 = 500,
/*still there for compatibility*/
R3MIX = 1000,
STANDARD = 1001,
EXTREME = 1002,
INSANE = 1003,
STANDARD_FAST = 1004,
EXTREME_FAST = 1005,
MEDIUM = 1006,
MEDIUM_FAST = 1007
} preset_mode;
/*asm optimizations*/
typedef enum asm_optimizations_e {
MMX = 1,
AMD_3DNOW = 2,
SSE = 3
} asm_optimizations;
/* psychoacoustic model */
typedef enum Psy_model_e {
PSY_GPSYCHO = 1,
PSY_NSPSYTUNE = 2
} Psy_model;
/* buffer considerations */
typedef enum buffer_constraint_e {
MDB_DEFAULT=0,
MDB_STRICT_ISO=1,
MDB_MAXIMUM=2
} buffer_constraint;
struct lame_global_struct;
typedef struct lame_global_struct lame_global_flags;
typedef lame_global_flags *lame_t;
/***********************************************************************
*
* The LAME API
* These functions should be called, in this order, for each
* MP3 file to be encoded. See the file "API" for more documentation
*
***********************************************************************/
/*
* REQUIRED:
* initialize the encoder. sets default for all encoder parameters,
* returns NULL if some malloc()'s failed
* otherwise returns pointer to structure needed for all future
* API calls.
*/
lame_global_flags * CDECL lame_init(void);
#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
#else
/* obsolete version */
int CDECL lame_init_old(lame_global_flags *);
#endif
/*
* OPTIONAL:
* set as needed to override defaults
*/
/********************************************************************
* input stream description
***********************************************************************/
/* number of samples. default = 2^32-1 */
int CDECL lame_set_num_samples(lame_global_flags *, unsigned long);
unsigned long CDECL lame_get_num_samples(const lame_global_flags *);
/* input sample rate in Hz. default = 44100hz */
int CDECL lame_set_in_samplerate(lame_global_flags *, int);
int CDECL lame_get_in_samplerate(const lame_global_flags *);
/* number of channels in input stream. default=2 */
int CDECL lame_set_num_channels(lame_global_flags *, int);
int CDECL lame_get_num_channels(const lame_global_flags *);
/*
scale the input by this amount before encoding. default=1
(not used by decoding routines)
*/
int CDECL lame_set_scale(lame_global_flags *, float);
float CDECL lame_get_scale(const lame_global_flags *);
/*
scale the channel 0 (left) input by this amount before encoding. default=1
(not used by decoding routines)
*/
int CDECL lame_set_scale_left(lame_global_flags *, float);
float CDECL lame_get_scale_left(const lame_global_flags *);
/*
scale the channel 1 (right) input by this amount before encoding. default=1
(not used by decoding routines)
*/
int CDECL lame_set_scale_right(lame_global_flags *, float);
float CDECL lame_get_scale_right(const lame_global_flags *);
/*
output sample rate in Hz. default = 0, which means LAME picks best value
based on the amount of compression. MPEG only allows:
MPEG1 32, 44.1, 48khz
MPEG2 16, 22.05, 24
MPEG2.5 8, 11.025, 12
(not used by decoding routines)
*/
int CDECL lame_set_out_samplerate(lame_global_flags *, int);
int CDECL lame_get_out_samplerate(const lame_global_flags *);
/********************************************************************
* general control parameters
***********************************************************************/
/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */
int CDECL lame_set_analysis(lame_global_flags *, int);
int CDECL lame_get_analysis(const lame_global_flags *);
/*
1 = write a Xing VBR header frame.
default = 1
this variable must have been added by a Hungarian notation Windows programmer :-)
*/
int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int);
int CDECL lame_get_bWriteVbrTag(const lame_global_flags *);
/* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */
int CDECL lame_set_decode_only(lame_global_flags *, int);
int CDECL lame_get_decode_only(const lame_global_flags *);
#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
#else
/* 1=encode a Vorbis .ogg file. default=0 */
/* DEPRECATED */
int CDECL lame_set_ogg(lame_global_flags *, int);
int CDECL lame_get_ogg(const lame_global_flags *);
#endif
/*
internal algorithm selection. True quality is determined by the bitrate
but this variable will effect quality by selecting expensive or cheap algorithms.
quality=0..9. 0=best (very slow). 9=worst.
recommended: 2 near-best quality, not too slow
5 good quality, fast
7 ok quality, really fast
*/
int CDECL lame_set_quality(lame_global_flags *, int);
int CDECL lame_get_quality(const lame_global_flags *);
/*
mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono
default: lame picks based on compression ration and input channels
*/
int CDECL lame_set_mode(lame_global_flags *, MPEG_mode);
MPEG_mode CDECL lame_get_mode(const lame_global_flags *);
#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
#else
/*
mode_automs. Use a M/S mode with a switching threshold based on
compression ratio
DEPRECATED
*/
int CDECL lame_set_mode_automs(lame_global_flags *, int);
int CDECL lame_get_mode_automs(const lame_global_flags *);
#endif
/*
force_ms. Force M/S for all frames. For tes
没有合适的资源?快使用搜索试试~ 我知道了~
iOS录音播放方法Demo
共90个文件
png:16个
m:4个
h:3个
5星 · 超过95%的资源 需积分: 5 1.4k 下载量 147 浏览量
2016-07-27
10:08:31
上传
评论 14
收藏 2.15MB ZIP 举报
温馨提示
一、搭建长按录音UI效果; 二、使用AVAudioRecorder录音; 三、使用AVAudioPlayer播放,并添加播放动画; 四、使用lame将caf音频转化为mp3; 五、将mp3 转化为 base64编码; 六、查看录音文件大小; 七、删除语音文件;
资源推荐
资源详情
资源评论
收起资源包目录
CSRecord.zip (90个子文件)
CSRecord
CSRecord.xcodeproj
project.xcworkspace
contents.xcworkspacedata 153B
xcuserdata
ios_chris.xcuserdatad
UserInterfaceState.xcuserstate 14KB
project.pbxproj 24KB
xcuserdata
ios_chris.xcuserdatad
xcschemes
xcschememanagement.plist 570B
CSRecord.xcscheme 4KB
xcdebugger
Breakpoints_v2.xcbkptlist 91B
.git
index 4KB
hooks
README.sample 177B
config 144B
description 73B
refs
tags
heads
master 41B
logs
refs
heads
master 159B
HEAD 159B
objects
24
8f6acc935a36d5a412064f40dc15bda422b6b0 316B
d5
111b16afce350930308b54c08cddf007dfc1cb 194B
36
d2c80d8893178d7e1f2964085b273959bfdc28 201B
90
9a2022d5f571414e014f752957e456e96775a9 912KB
be
c45f2f10fa3c3fe8504d230637a941c802fe97 116B
2d
86bc377ca20da29d951d041bcca2c798615c0c 226B
70
a2fa8953d51a12ea09d945b71d9f0a39d17f0d 129B
9a
1df9b0d698a2a9aa041eac4bcca6619196c52d 528B
ca
28f35512c285df60a51db17432cdc421f6e14d 7KB
de
ef2281c8e23dfb88f47ed227f5c32334d116c0 637B
db
3f0ce163c8033a175d27de6a4e96aadc115625 59B
ba
72822e8728ef2951005e49b6c27a2f1da6572d 353B
d7
2a8106af2a2e5fe1323803b2aad512e5ca9722 174B
59
ca433b8f1f77eeaab3e6e07a9e18e0e28863c3 51B
b0
4364089fdc64fe3b81bcd41462dd55edb7a001 57B
168ee87e316b266425dd61e45299f72686335f 104B
9f
99fbb56788f6536340e188432313d76642d8cf 134B
40
c6215d906736d7b2a439c17cf9ee0776580474 535B
6d
2f611940e244d80dbbcf475092cbbbd12bf1d9 30KB
34
fd40f127de0933f40f61932c863a4f6685f50c 131B
33
d4711db9ed32de272be9b585bdfcd3079d0e53 24KB
a4
4564c8fe1f4a4c7ca1ed6737caacad4754380f 17KB
info
47
8390f651632efc49ee4b8dd9bc20ce8e364eea 69B
850a6c852ab0856ac539f42f66e5e75b1766c8 261B
2e
721e1833f03bb0e1b962a84491d7e43e3fef9c 753B
79
1d4918c188b6afb201c67dcd2d9b19b4f68a51 13KB
pack
f7
834699b25a23272958e9806c8aa039ff84ae66 884B
f6
d602c50b4050d459c500822e606c6d182cd9ff 14KB
17
25fffc26fabe09bd1e88cca5413abd525828b5 15KB
16
58dd3ea46e0d005cdb6dff190c340c9bb4907a 29KB
96
714ad13c0a21b3320b84a26e4d63ec355b98da 307B
49
c4178b8993d0bb0e21aff3eface93862c0d2cf 577B
8d
73dab050628659eb6777973c3540accc344b18 394B
56
b1538a3793eb72e11872f3472ea9de5b055a94 217B
93
77bb7d8a61c09378a2fdfb253dd4a18cfcb901 315B
b9
2f1cdf650775d76065a3e5be68a21e307d0eb1 593B
859cfa7218c03e2f2e6d72936f2d1c8bf8beef 3KB
54
8be297029868413991b7e0290282b3de1fa2dd 95B
09
973201070878a49207c254f9ebb9e1d91aa7dd 25KB
5f
586f3388d0abab4b48b502256a27ec95d5a488 96B
6f
bfe832675da35da91057202db179f3a7cc411d 286B
4b9c9f4d986e69b90f2d9dc04122a3d2176f10 18KB
c2
44d82a2c28d3ce68e389ae1e4097d666d3bbaa 917B
f5
6d2f3bb56e8474d49393008be744986bd41c3c 719B
e7
e53f74c9518f7941ebee5803f851fe8b1b0bfb 63B
info
exclude 40B
COMMIT_EDITMSG 15B
HEAD 23B
CSRecord
Assets.xcassets
AppIcon.appiconset
Contents.json 1KB
main.m 329B
MakeVoiceNoticeController.m 22KB
AppDelegate.h 272B
AppDelegate.m 2KB
Base.lproj
LaunchScreen.storyboard 2KB
Main.storyboard 2KB
Voice
voice@3x.png 864B
voice3@2x.png 573B
record_norm@3x.png 24KB
rcirle_norm@2x.png 17KB
rcirle_high@2x.png 18KB
record_high@3x.png 25KB
voice1@3x.png 293B
voice3@3x.png 864B
record_norm@2x.png 14KB
voice@2x.png 573B
voice1@2x.png 202B
rcirle_high@3x.png 29KB
record_high@2x.png 15KB
voice2@2x.png 374B
rcirle_norm@3x.png 30KB
voice2@3x.png 557B
Info.plist 1KB
lame
libmp3lame.a 2.12MB
lame.h 48KB
MakeVoiceNoticeController.h 245B
CSRecordUITests
CSRecordUITests.m 1KB
Info.plist 733B
共 90 条
- 1
伊织code
- 粉丝: 7557
- 资源: 56
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页