audio

Reducing WAV sound file size, without losing quality

耗尽温柔 提交于 2021-02-19 05:32:44
问题 My application needs to play sound files. The only cross-platform file format I can use is WAVE (I'm using QSound of the Qt framework). The file sizes of these sounds are quite large and I'd like to know if there is a way to reduce it, without losing (too much) quality. I need the file to be stereo. 回答1: You can zip them (using zlib or similar), then uncompress them on demand. If you've got many minutes of continuous wav it may be worth looking into audio-specific lossless compression

mciSendString won't play an audio file if path is too long

人走茶凉 提交于 2021-02-19 01:30:08
问题 When the path+filename of a file is really long, I've noticed that PlaySound(fName.c_str(), NULL, SND_ASYNC); works, but not mciSendString((L"open \"" + fName + L"\" type waveaudio alias sample").c_str(), NULL, 0, NULL); mciSendString(L"play sample", NULL, 0, NULL); Example of failing command: open "C:\qisdjqldlkjsqdjqdqjslkdjqlksjlkdjqsldjlqjsdjqdksq\dajdjqjdlqjdlkjazejoizajoijoifjoifjdsfjsfszjfoijdsjfoijdsoifoidsjfojdsofjdsoijfoisjfoijoisdjfosjfqsd\Windows Critical Stop.wav" type waveaudio

Unity: Difference between Audio Source, Audio Listener and Audio Clip

房东的猫 提交于 2021-02-18 22:34:26
问题 I would like to play some sound effects in my Unity project. I looked for a solution on the official website but I could not get the difference between an Audio Source, an Audio Listener and an Audio Clip. Is it better to add them programmatically or to use an appropriate component? Thank you in advance for your patience. 回答1: An AudioSource is a component that allows for sound to be played in your scene. It also holds the control options for the audio like Play Pause volume loop and all

FFmpeg: Batch convert all audio (mp3) in folder to video (mp4) with album artwork

泪湿孤枕 提交于 2021-02-18 18:58:36
问题 I'm looking to batch convert all audio (mp3) in folder to video (mp4) with album artwork. This for uploading audios to youtube. I have pretty much a working code but I want to automate the whole thing. Here's the code from .bat file I'm using. (source:FFMpeg Batch Image + Multiple Audio to video) echo off for %%a in ("*.mp3") do "C:\ffmpeg\bin\ffmpeg" -loop 1 -i "C:\ffmpeg\bin\input.jpg.jpg" -i "%%a" -c:v libx264 -preset veryslow -tune stillimage -crf 18 -pix_fmt yuv420p -c:a aac -shortest

How to resume audio playing of other apps after dismissing AVPlayerViewController?

放肆的年华 提交于 2021-02-18 18:09:13
问题 I use AVPlayerViewController to play short videos in my app. If there is an app playing audio in background before user plays a video in my app, I want the background audio playing of the other app to resume after my video player is dismissed. I currently use AVAudioSession.setActive(false, with: .notifyOthersOnDeactivation) to do that. Even though Apple's Music app and Podcasts app do resume playing after I call AVAudioSession.setActive(false, with: .notifyOthersOnDeactivation) —won't resume

How to resume audio playing of other apps after dismissing AVPlayerViewController?

馋奶兔 提交于 2021-02-18 18:06:08
问题 I use AVPlayerViewController to play short videos in my app. If there is an app playing audio in background before user plays a video in my app, I want the background audio playing of the other app to resume after my video player is dismissed. I currently use AVAudioSession.setActive(false, with: .notifyOthersOnDeactivation) to do that. Even though Apple's Music app and Podcasts app do resume playing after I call AVAudioSession.setActive(false, with: .notifyOthersOnDeactivation) —won't resume

How to check programmatically with python if any other application is playing audio/video

放肆的年华 提交于 2021-02-18 18:03:11
问题 I need to check if any application is playing any kind of media. Most importantly I want my Python program to detect whichever application is playing audio. The name of the application the audio is playing. And any related data are welcome. I searched this up before posting here. I got many results, but unfortunately those are not for python. They were made for languages like C and C++. My spec for your reference: Operating System: Windows 10 Python Version 3.8 来源: https://stackoverflow.com

combine two audio files with a command line tool

这一生的挚爱 提交于 2021-02-18 17:36:21
问题 I've to merge two (or more) audio files (like a guitar and a drum track) into a single file. I'm running over linux CentOS and I'd need a command line tool to do so, because I've got to run this as part of a background process, triggered via crontab of a custom bash script. I also need to be able to change the pan, volume, trim and start time (i.e I want the guitar track to start after 1.25ms after the drum track so that they can be both in sync with each other). My first choice would be

combine two audio files with a command line tool

[亡魂溺海] 提交于 2021-02-18 17:36:10
问题 I've to merge two (or more) audio files (like a guitar and a drum track) into a single file. I'm running over linux CentOS and I'd need a command line tool to do so, because I've got to run this as part of a background process, triggered via crontab of a custom bash script. I also need to be able to change the pan, volume, trim and start time (i.e I want the guitar track to start after 1.25ms after the drum track so that they can be both in sync with each other). My first choice would be

Can HTML5 in the browser play continuous audio on iOS lock screen?

自古美人都是妖i 提交于 2021-02-18 06:25:16
问题 I have been trying to track this down and there doesn't seem to be a consistent answer. If I have a website that tries to play multiple songs in a row (think playlist) using the HTML 5 audio element, can it continue to work on the iOS lock screen? For some background, this answer seems to indicate it may be possible. But then this article suggests it is not. I tried following the closest example of what Apple recommends, as found here, to replicate this. I am using plain, vanilla javascript