Winsound.Playsound playing a default sound in Python - python-3.x

winsound.PlaySound('a.wav',winsound.SND_ASYNC) is not able to play the sound that I really want in the game. a.wav is in the same directory as where my python file is located but still, it doesn't work. What should I do? It keeps on playing the windows default sound.

Related

force vlc to load ui on raspberry booted to cli

I've been googling for this all week, struggling to find a good solution.
I have a training video kiosk script that I've set up for my company, running on an intel NUC. to me, that feels like overkill, so I'm trying to get the script to run on a pi 3 model b to save a little on costs to deploy this thing.
my script works great from desktop, I've been able to get it to run on startup from the cli, & I can even load the videos with the dummy UI - the problem is that there's no sound, and when the video loads in the cli, it fills the screen with errors, then plays as text, like the picture below.
If I run it from desktop, it's fine (just really jittery)
is there a way to force vlc to load its interface without loading the desktop of raspian?
right now, when I call a video, the terminal line inputs like:
vlc-wrapper <file path> --play-and-exit --fullscreen -Idummy
video image
got it to load the video
from command line:
X & vlc <filepath>
also got it to run from python
import os.subprocess
subprocess.call(['xinit', '--', '/usr/bin/vlc-wrapper, '<filepath>'])

Why is my sound not playing on desktop but on mobile is playing?

I have mp3 file and I want to play it on my stack.
When I opencard I want to play sound on background.Here code:
on preopencard
play "/Users/PeshZ/Desktop/sound.mp3"
end preopencard
My sound not played.But on ipad it playing.
What's wrong?
To use "play audioclip" the sound file must be uncompressed wav, aif, or au. The LC engine cannot decompress sound files. The audioclip command is very old and has limited use, and it has been deprecated in favor of the player object.
You can play mp3 files on the desktop by setting the filename of a player object to the file path of the sound on disk. Players are much more flexible than the audioclip method.
iOS supports mp3 natively, which is why it plays there.
try play audioclip "/your/path"
By the way, google can provide this information within 3 seconds:
http://lessons.runrev.com/m/4071/l/25230-play-sounds

Is there an ActionScript library for MP3 encoding than Shine-MP3-Encoder?

Is there an ActionScript library for MP3 encoding than Shine-MP3-Encoder? (https://github.com/kikko/Shine-MP3-Encoder-on-AS3-Alchemy)
This library works fine, but I wanted to find a similar solution (on ActionScript, not C) to optimize it for specific needs.
Thanks.
Dont wait for it. A pure AS3 library is impossible as the speed of AS3 is too slow to do MP3 encoding. You will need C++ via AIR Native Extensions (ANE) or Alchemy for this. ANEs work with Adobe AIR so you can publish your content as an app for desktop and mobile. I dont see any issue with it.
See these for ANE-based Mic recording:
ANE-RecordAudio
AirMicrophone
AirMicrophone-ANE
I recorded the mic into a WAV and then use ffmpeg -i d:/path/input.wav d:/path/output.mp3 to convert it instantly into an MP3. I delete the WAV when FFMPEG completes. FFMPEG is a cool little EXE you can just add to your project in any dir. I used Thibault's class to record into WAV.

How to play audio on Corona?

I am trying to play audio as i used to do but it seems not working now. These are the codes I tried:
local birdSound = audio.loadSound("bird.mp3")
audio.play(birdSound)
It gives an error like that:
WARNING: Failed to create audio sound
Can you help me out? Thanks.
Don't use .mp3. .wav works for both iphone and android.
Make sure the .wav file is in our folder.
Sometimes some sound file can be played on computer, but not works in simulator. In that case, use other files instead.
If you really like that .mp3 file and can not find .wav, find some free software to convert it.
Changing the bit rate(increasing) of my files helped me to solve the problem. Thanks to SatheeshJM!

Record screen and audio then generate to one video file in java.

I am writting a program as http://www.screencast-o-matic.com/. I used applet and import jmf.jar to my project. When I use it, it couldn't get anything capture devices so it couldn't capture audio and video.
I captured screen to video but it hadn't sound. I captured sound but it hadn't video. I use jmf to merger 2 stream to video file. But it error.
Everybody can help me to resol problem. Thanks your help.
You can use Xuggle-Xuggler http://www.javacodegeeks.com/2011/02/introduction-xuggler-video-manipulation.html API which is wrapper of FFmpeg command line tool. Both are open source.

Resources