playback

Keep playing a sound over and over again in Matlab?

不羁的心 提交于 2020-01-05 03:58:26
问题 I'm trying to create a MATLAB program to play a sound over and over again every couple of minutes. Right now I have it set to play every couple of seconds, just to get some bugs out of the system. However, when my program tries to replay the sound I get this error: ??? Error using ==> audioplayer.audioplayer>audioplayer.resume at 710 A given audio device may only be opened once. Error in ==> audioplayer.play at 88 obj.resume(); Error in ==> audiorecorder.audiorecorder>audiorecorder.play at

Update on Spotify API not allowing auto play

瘦欲@ 提交于 2020-01-01 07:05:08
问题 I've been developing a website that uses the Spotify API which links to track via the track URI: spotify:track:--TRACKIDHERE-- For instance a band called Circa Waves and their song 'T Shirt Weather': spotify:track:5DrZ0fdWlP0rtwR6VOsrWt However, since the update of the Spotify software recently (where the lyrics button was added and the volume changed to the right hand side) when you click the URI the tracks no longer autoplay when Spotify pops up on your computer. Is there anyway around this

iOS how to don't stop music when the app start launching

心已入冬 提交于 2020-01-01 04:18:06
问题 I've noticed that when my app start, the music I'm listening is automatically stopped, and I've noticed that when I start some other apps, the music just continue... this means that I don't know how to manage the actual playing music in the device to let it plays or stop. I'm developing a game with obj-c and cocos2d btw, I've searched but sadly I've found nothing... so here's my question, how can I let the music I'm listening with my device continue to play even if I start the app ? edit: I'm

How to add audio to a HTML image?

只谈情不闲聊 提交于 2019-12-29 08:23:50
问题 I'm still new to all this, but I'm trying to add audio mp3 sound to an HTML image, which is played when clicked on. How can I do this right? I've already tries a few things, like the '' tag, or installing java-based stuff, like soundmanager2, however none of them seems to work. The problem is, that I don't know how to use them properly. I'm using dreamweaver CS6, in which there should be an option "behaviour"--> play sound, but it's not there, so I'm lost with all this. 回答1: You can achieve

How to add audio to a HTML image?

╄→尐↘猪︶ㄣ 提交于 2019-12-29 08:23:05
问题 I'm still new to all this, but I'm trying to add audio mp3 sound to an HTML image, which is played when clicked on. How can I do this right? I've already tries a few things, like the '' tag, or installing java-based stuff, like soundmanager2, however none of them seems to work. The problem is, that I don't know how to use them properly. I'm using dreamweaver CS6, in which there should be an option "behaviour"--> play sound, but it's not there, so I'm lost with all this. 回答1: You can achieve

Toggle button visibility in android activity

可紊 提交于 2019-12-29 07:42:30
问题 I have an activity with two play and pause buttons (currently invisible) and a seekbar. When I press the play button, the pause button should become visible, and when I press the pause button it should turn invisible. How would I do that? import android.media.MediaPlayer; import android.os.Bundle; import android.app.Activity; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.SeekBar; import android.widget.SeekBar

Play simple beep with python without external library

痴心易碎 提交于 2019-12-29 03:27:13
问题 Using only the modules that come with a standard python 2.6 installation, would it be possible to play a simple beeping noise? 回答1: If you're on a Unix terminal, you can print "\a" to get a terminal bell: >>> def beep(): ... print "\a" >>> beep() Of course, that will print a newline too… So sys.stdout.write("\a") might be better. But you get the idea. 回答2: On windows: import winsound # for sound import time # for sleep winsound.Beep(440, 250) # frequency, duration time.sleep(0.25) # in

Play background music in all activities of Android app

会有一股神秘感。 提交于 2019-12-28 06:56:46
问题 I spend about 20 hours until now and my problem there still is . I am creating an android application that has several Activities (mainMenu , aboutUs,setting). I followed the best answered of below link and that was O.K . Music played using asyncTask isn't stopping by using cancel When i run my app,(my code is in mainActivity ), the music begin and it does not stop when navigate to other Activities . This is GOOD . But i put a ToggleButton in my setting_activity Activity that i hope this

Reading and playing sound in Octave on Fedora12

若如初见. 提交于 2019-12-25 04:19:29
问题 I would like to read a wav file and play it in octave. I am using octave 3.4.0 on fedora 12. This is my code - 1. [audio_samples,fs] = wavread("myaudio.wav"); sound(audio_samples,fs); To this octave complained that "Sound function is not implemented" Then I tried [audio_samples,fs] = wavread("myaudio.wav"); playsound (audio_samples); To this I get following from octave - error: Invalid call to playaudio. Upon some preliminary debugging for #2 above I see that playaudio(x) function first

Android MediaRecorder to AudioTrack, Recording and Playback

不羁岁月 提交于 2019-12-25 00:28:11
问题 I'm trying to make it to where I can record the users voice and play it back in the same activity using the MediaRecorder and AudioTrack. I just don't understand how to write the file to AudioTrack. I've read the documents on both and simply can't figure it out. Any help would be appreciated. Here's my code so far, it's not complete. The only buttons you need to read are recordButton and playbackButton. Thanks! private File outputFile = null; private AudioTrack voice = null; private