# Audio mix **Repository Path**: lazy-ai/audio-mix ## Basic Information - **Project Name**: Audio mix - **Description**: 录制铃音,增加混音效果,目前只支持编解码MP3格式文件。音频编辑处理,录制、解码、转换、拼接、提取、合成 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-24 - **Last Updated**: 2024-11-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 音频编解码,录制铃音,增加混音效果,目前只支持编解码MP3格式文件。将音频文件放到SDCard/RecordMixMp3/music目录下,进入软件,点击演唱就可以了。 本项目用到 lame、libmad,ting 分享源代码 Android.mk 1.# Copyright (C) 2009 The Android Open Source Project 2.# 3.# Licensed under the Apache License, Version 2.0 (the "License"); 4.# you may not use this file except in compliance with the License. 5.# You may obtain a copy of the License at 6.# 7.# http://www.apache.org/licenses/LICENSE-2.0 8.# 9.# Unless required by applicable law or agreed to in writing, software 10.# distributed under the License is distributed on an "AS IS" BASIS, 11.# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12.# See the License for the specific language governing permissions and 13.# limitations under the License. 14.# 15.#ifeq ($(strip $(BUILD_WITH_GST)),true) 16. 17.LOCAL_PATH:= $(call my-dir) 18. 19.include $(CLEAR_VARS) 20. 21.LAME_LIBMP3_DIR := libmp3lame/src 22. 23.LOCAL_SRC_FILES:= \ 24. version.c \ 25. fixed.c \ 26. bit.c \ 27. timer.c \ 28. stream.c \ 29. frame.c \ 30. synth.c \ 31. decoder.c \ 32. layer12.c \ 33. layer3.c \ 34. huffman.c \ 35. MyMinimad.c \ 36. NativeMP3Decoder.cpp \ 37. native_libmad.cpp \ 38. FileSystem.cpp \ 39. mixrecord.c \ 40. mp3decode.c \ 41. $(LAME_LIBMP3_DIR)/bitstream.c \ 42. $(LAME_LIBMP3_DIR)/fft.c \ 43. $(LAME_LIBMP3_DIR)/id3tag.c \ 44. $(LAME_LIBMP3_DIR)/mpglib_interface.c \ 45. $(LAME_LIBMP3_DIR)/presets.c \ 46. $(LAME_LIBMP3_DIR)/quantize.c \ 47. $(LAME_LIBMP3_DIR)/reservoir.c \ 48. $(LAME_LIBMP3_DIR)/tables.c \ 49. $(LAME_LIBMP3_DIR)/util.c \ 50. $(LAME_LIBMP3_DIR)/VbrTag.c \ 51. $(LAME_LIBMP3_DIR)/encoder.c \ 52. $(LAME_LIBMP3_DIR)/gain_analysis.c \ 53. $(LAME_LIBMP3_DIR)/lame.c \ 54. $(LAME_LIBMP3_DIR)/newmdct.c \ 55. $(LAME_LIBMP3_DIR)/psymodel.c \ 56. $(LAME_LIBMP3_DIR)/quantize_pvt.c \ 57. $(LAME_LIBMP3_DIR)/set_get.c \ 58. $(LAME_LIBMP3_DIR)/takehiro.c \ 59. $(LAME_LIBMP3_DIR)/vbrquantize.c \ 60. $(LAME_LIBMP3_DIR)/version.c \ 61. $(LAME_LIBMP3_DIR)/com_wt_recordmixmp3_util_SimpleLame.c \ 62. cn_com_util_Jni.cpp 63. 64.LOCAL_ARM_MODE := arm 65. 66.LOCAL_MODULE:= libmad 67. 68.LOCAL_C_INCLUDES := \ 69. $(LOCAL_PATH)/android 70. 71.LOCAL_CFLAGS := -DHAVE_CONFIG_H -DFPM_ARM -ffast-math -O3 72. 73.LOCAL_LDLIBS := -llog 74. 75.include $(BUILD_SHARED_LIBRARY) 76. 77.#endif 78. 复制代码 /com_qd_videorecorder_util_SimpleLame.h /com_qd_videorecorder_util_SimpleLame.c /mp3decode.c /mixrecord.c 源代码: RecordMixMp3.zip APK文件: RecordMixMp3.apk 音频文件: 朋友别哭.zip RecordMixMp3(带非录制mp3与mp3混音).zip RecordMixMp3(录音mp3).rar ↓相同↑ RecordMixMp3 文件夹是 RecordMixMp3(密码ting@123).zip 解压后的文件 思路: 解码MP3背景音——》PCM音频源 ↓混合 录制PCM音频源 ↓ 得到结果PCM ↓ 转码MP3 最终得到混音后的文件 音频文件放到SDCard/RecordMixMp3/music目录下