playsound

Play multiple .wav files simultaniously with Naudio or Win API

半腔热情 提交于 2019-12-10 14:00:01
问题 Hi All I have an application which receives simultaneously wav data through multiple threads from different UDP ports: Is it possible to play all received wav data at same time, simultaneously, using Wave Out API? Is it possible to play all received wav data at same time, simultaneously, using NAudio? does NAudio objects thread safe? saying play simultaneously I mean case when a file played in media player and something in YouTube played at the same time and you can hear both sound from your

How to play a sound in VB6 with PlaySound() [closed]

…衆ロ難τιáo~ 提交于 2019-12-10 12:25:18
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . How can I use PlaySound() to play a .wav file? I have PlaySound(sound) but I keep getting error "Argument not optional". Also how do I stop playing a sound? 回答1: You don't show us any code in your question, so I

Play random sounds without repeat

折月煮酒 提交于 2019-12-08 08:48:36
问题 I'm looking to have an image, that when clicked plays a sound clip (from a list of sound clips) without repeating the same clip (until the user goes through the whole list of sounds.) At the moment my code works but plays any one of my sound clips randomly and repeats a lot. If anyone knows how to tweak this to make it play every clip in the list at least once before repeating that would be brilliant! This is the code I'm using at the moment: <script type="text/javascript" src="http://ajax

Python 3 No Module Named AppKit

孤者浪人 提交于 2019-12-07 07:41:42
问题 I am trying to run an audio file in python from playsound import playsound def main(): playsound('audio.mp3') main() However, I keep getting the following error: File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/playsound.py", line 55, in _playsoundOSX from AppKit import NSSound ImportError: No module named 'AppKit' I am using Python 3.5.4 on macOS 10.12.6. I have tried installing it via pip but I am returned this error: Using cached AppKit-0.2.8.tar.gz

Python 3 No Module Named AppKit

有些话、适合烂在心里 提交于 2019-12-05 12:07:56
I am trying to run an audio file in python from playsound import playsound def main(): playsound('audio.mp3') main() However, I keep getting the following error: File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/playsound.py", line 55, in _playsoundOSX from AppKit import NSSound ImportError: No module named 'AppKit' I am using Python 3.5.4 on macOS 10.12.6. I have tried installing it via pip but I am returned this error: Using cached AppKit-0.2.8.tar.gz Requirement already satisfied: flask in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site

How do play audio (playsound) in background of Python script?

可紊 提交于 2019-12-05 10:17:15
问题 I am just writing a small python game for fun and I have a function that does the beginning narrative. I am trying to get the audio to play in the background but unfortunately the mp3 file plays first before the function continues. How do I get it to run in the background? import playsound def displayIntro(): playsound.playsound('storm.mp3',True) print('') print('') print_slow('The year is 1845, you have just arrived home...') Also, is there any way of controlling the volume of the play sound

How do play audio (playsound) in background of Python script?

三世轮回 提交于 2019-12-03 21:26:22
I am just writing a small python game for fun and I have a function that does the beginning narrative. I am trying to get the audio to play in the background but unfortunately the mp3 file plays first before the function continues. How do I get it to run in the background? import playsound def displayIntro(): playsound.playsound('storm.mp3',True) print('') print('') print_slow('The year is 1845, you have just arrived home...') Also, is there any way of controlling the volume of the play sound module? I should add that I am using a Mac, and I am not wedded to using playsound, it just seems to

Immediate play sound on button click in html page

为君一笑 提交于 2019-12-03 09:41:20
问题 In my .html page I have 9 images for dialing numbers and one text box that shows the pressed numbers. I want each of those images to immediately play beep sound when users click on them. I tried to use embed with hidden property and navigate it's source to .wav sound. It is working OK, but when I press the images one after another immediately, it cannot play sound and just bees once at the end. Is there any faster way of playing a .wav sound on 'onclick' method? Thanks in advance. 回答1: If you

Immediate play sound on button click in html page

懵懂的女人 提交于 2019-12-03 00:13:56
In my .html page I have 9 images for dialing numbers and one text box that shows the pressed numbers. I want each of those images to immediately play beep sound when users click on them. I tried to use embed with hidden property and navigate it's source to .wav sound. It is working OK, but when I press the images one after another immediately, it cannot play sound and just bees once at the end. Is there any faster way of playing a .wav sound on 'onclick' method? Thanks in advance. If you only need to support recent browsers, then HTML 5 offers you the Audio object to load/buffer your sound:

Android Camera 拍照/摄像提示音

两盒软妹~` 提交于 2019-11-30 06:49:22
其实,Camera 拍照/摄像提示音是为了防止偷拍,业内有不成文规定,手机公司在做camera时,点击拍照和录像键的时候,必须要有提示音。因此,google也就非常人性化的将播放拍照声音的函数,放到了cameraService中,防止开发者能开发出不响的camera,从而只要调用拍照函数,一定会响,这是写死在framework中的。 Camera真正播放提示音的是在CameraService.cpp中的playSound()方法,这个方法提供给拍照/摄像时调用。 // /frameworks/base/services/camera/libcameraservice/CameraService.cpp void CameraService::playSound(sound_kind kind) { LOG1("playSound(%d)", kind); Mutex::Autolock lock(mSoundLock); sp<MediaPlayer> player = mSoundPlayer[kind]; if (player != 0) { player->seekTo(0); player->start(); } } 下面就是在开始摄像时会调用playSound()方法播放提示音: status_t CameraService::Client: