Play a tune on the vehicle
760443
def play_tune(self, tune):
        ''''''
        msg = self.message_factory.play_tune_encode(0, 0, tune)
        self.send_mavlink(msg)
202997
def set_music(self, plylst, force=False):
        '''
        
        '''
        plylst = plylst.lower()
        if plylst != self.cur_playlist or force:
            self.cur_playlist = plylst
            self.play_song(self.get_playlist().begin())
22469
def play(channels, blocking=True, raw_samples=False):
	'''
	 
	'''
	if not pyaudio_loaded:
		raise Exception("Soundcard playback requires PyAudio. Install with `pip install pyaudio`.")

	channel_count = 1 if hasattr(channels, "next") else len(channels)
	wavgen = wav_samples(channels, raw_samples=raw_samples)
	p = pyaudio.PyAudio()
	stream = p.open(
		format=p.get_format_from_width(SAMPLE_WIDTH),
		channels=channel_count,
		rate=FRAME_RATE,
		output=True,
		stream_callback=_pyaudio_callback(wavgen) if not blocking else None
	)
	if blocking:
		try:
			for chunk in buffer(wavgen, 1024):
				stream.write(chunk)
		except Exception:
			raise
		finally:
			if not stream.is_stopped():
				stream.stop_stream()
			try:
				stream.close()
			except Exception:
				pass
	else:
		return stream
968670
private void doStartPlaying()
	{
		if (currentContainer!=null)
		{
			doStopPlaying();
			if (currentContainer instanceof ModContainer)
			{
				System.out.println(((ModContainer) currentContainer).getCurrentMod().toString());
			}
			Mixer mixer = createNewMixer();
			mixer.setExportFile(wavFileName);
			playerThread = new PlayThread(mixer, this);
			playerThread.start();
		}
	}
891979
function(index) {
    var self = this;

    // Stop the current track.
    if (self.playlist[self.index].howl) {
      self.playlist[self.index].howl.stop();
    }

    // Reset progress.
    progress.style.width = '0%';

    // Play the new track.
    self.play(index);
  }
1200923
public void setTune(Tune tune){
		m_jTune = new JTune(tune,
							new Point(0, 0),
							getTemplate());
		m_jTune.setColor(getForeground());

		m_selectedItems = null;
		m_dimension.setSize(m_jTune.getWidth(), m_jTune.getHeight());
		setPreferredSize(m_dimension);
		setSize(m_dimension);
		m_isBufferedImageOutdated=true;
		repaint();
	}
1285797
function() {

            var muteControl = this.options.muted ? 'fa-volume-off' : 'fa-volume-up';
            var playPauseControl = this.options.autoplay ? 'fa-pause' : 'fa-play';

            var controlsHTML = ' \
              <div class="controlsWrapper">\
                <div class="valiant-progress-bar">\
                    <div style="width: 0;"></div><div style="width: 100%;"></div>\
                </div>\
                <div class="controls"> \
                    <a href="#" class="playButton button fa '+ playPauseControl +'"></a> \
					<div class="audioControl">\
						<a href="#" class="muteButton button fa '+ muteControl +'"></a> \
						<div class="volumeControl">\
							<div class="volumeBar">\
								<div class="volumeProgress"></div>\
								<div class="volumeCursor"></div>\
							</div>\
						</div>\
					</div>\
					<span class="timeLabel"></span> \
                    <a href="#" class="fullscreenButton button fa fa-expand"></a> \
                </div> \
              </div>\
            ';

            $(this.element).append(controlsHTML, true);
			$(this.element).append('<div class="timeTooltip">00:00</div>', true);

            // hide controls if option is set
            if(this.options.hideControls) {
                $(this.element).find('.controls').hide();
            }

            // wire up controller events to dom elements
            this.attachControlEvents();
        }
605866
def play(self, sound):
        
        self.is_done.clear()  # hold is_done until the sound is played
        if self.sr != sound.sr:
            raise ValueError('You can only play sound with a samplerate of {} (here {}). Use the Sound.resample method for instance.', self.sr, sound.sr)

        if sound in self.sounds:
            self.remove(sound)

        with self.chunk_available:
            self.sounds.append(sound)
            sound.playing = True

            self.chunk_available.notify()
        self.is_done.wait()
707700
private void play(String track, String name)
    {
        Verbose.info(INFO_PLAYING, name);
        play(track);
    }
1074766
def play_Bar(self, bar):
        """"""
        self.set_deltatime(self.delay)
        self.delay = 0
        self.set_meter(bar.meter)
        self.set_deltatime(0)
        self.set_key(bar.key)
        for x in bar:
            tick = int(round((1.0 / x[1]) * 288))
            if x[2] is None or len(x[2]) == 0:
                self.delay += tick
            else:
                self.set_deltatime(self.delay)
                self.delay = 0
                if hasattr(x[2], 'bpm'):
                    self.set_deltatime(0)
                    self.set_tempo(x[2].bpm)
                self.play_NoteContainer(x[2])
                self.set_deltatime(self.int_to_varbyte(tick))
                self.stop_NoteContainer(x[2])
294577
def play(device_id = nil, params = {})
      url = "me/player/play"
      url = device_id.nil? ? url : "#{url}?device_id=#{device_id}"

      User.oauth_put(@user.id, url, params.to_json)
    end
896790
def _play(self):
        
        while True:
            if self._buffered:
                self._source.push(self._buffer.get())
277069
private static void showHelp()
	{
		Log.info("java -jar ./javamod [-rx] [-b{8,16,24}] [-s{+,-}] [-i{+,-}] [-w{+,-}] [-n{+,-}] [-m{+,-}] [-l{+,-}] [-h{+,-}] [-j{+,-}] [-v0.0-1.0]");
		Log.info("                    [-eWAVFILE] MODFILE\n");
		Log.info("-rx        : use Samplerate x (8000/11025/22050/44100/96000...");
		Log.info("                               anything allowed, your soundhardware supports)");
		Log.info("-b8/16/24  : #Bits per sample");
		Log.info("-s+/-      : Stereo/Mono");
		Log.info("-i0/1/2/3  : interpolation: 0:none; 1:linear; 2:cubic spline; 3:fir interpolation");
		Log.info("-tms       : ms of buffer size (30 is minimum)");
		Log.info("-w+/-      : do/don't wide stereo mix");
		Log.info("-n+/-      : do/don't noise reduction");
		Log.info("-m+/-      : do/don't mega bass");
		Log.info("-l0/1/2    : set infinit loop handling: 0:original; 1:fade out; 2:ignore");
		Log.info("-h+/-      : do/don't shuffle playlists after loading");
		Log.info("-j+/-      : do/don't repeat playlist");
		Log.info("-v0.0-1.0  : set volume");
		Log.info("-eWAVEFILE : export to wave file");
	}
502579
def play_sound(self, subject='Find My iPhone Alert'):
        
        data = json.dumps({
            'device': self.content['id'],
            'subject': subject,
            'clientContext': {
                'fmly': True
            }
        })
        self.session.post(
            self.sound_url,
            params=self.params,
            data=data
        )
892772
void playAsMusic(int buffer,float pitch,float gain, boolean loop) {
		paused = false;
		
		setMOD(null);
		
		if (soundWorks) {
			if (currentMusic != -1) {
				AL10.alSourceStop(sources.get(0));
			}
			
			getMusicSource();
			
			AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffer);
			AL10.alSourcef(sources.get(0), AL10.AL_PITCH, pitch);
		    AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, loop ? AL10.AL_TRUE : AL10.AL_FALSE);
			
			currentMusic = sources.get(0);
			
			if (!music) {
				pauseLoop();
			} else {
				AL10.alSourcePlay(sources.get(0)); 
			}
		}
	}
512024
public void play() {
        checkState();
        if (mState == STATE_PAUSED) {
            PlaybackService.resume(getContext(), mClientKey);
        } else if (mState == STATE_STOPPED) {
            SoundCloudTrack track = mPlayerPlaylist.getCurrentTrack();
            if (track != null) {
                PlaybackService.play(getContext(), mClientKey, track);
            } else {
                return;
            }
        }
        mState = STATE_PLAYING;
    }
1027705
def bass(self, bass):
        """"""
        bass = int(bass)
        bass = max(-10, min(bass, 10))  # Coerce in range
        self.renderingControl.SetBass([
            ('InstanceID', 0),
            ('DesiredBass', bass)
        ])