Set current audio track.
    @param p_mi: media player.
    @param i_track: the track ID (i_id field from track description).
    @return: 0 on success, -1 on error.
549289
def libvlc_audio_set_track(p_mi, i_track):
    '''
    '''
    f = _Cfunctions.get('libvlc_audio_set_track', None) or \
        _Cfunction('libvlc_audio_set_track', ((1,), (1,),), None,
                    ctypes.c_int, MediaPlayer, ctypes.c_int)
    return f(p_mi, i_track)
405213
def libvlc_video_set_spu(p_mi, i_spu):
    '''
    '''
    f = _Cfunctions.get('libvlc_video_set_spu', None) or \
        _Cfunction('libvlc_video_set_spu', ((1,), (1,),), None,
                    ctypes.c_int, MediaPlayer, ctypes.c_int)
    return f(p_mi, i_spu)
1334191
def libvlc_video_get_track_description(p_mi):
    '''
    '''
    f = _Cfunctions.get('libvlc_video_get_track_description', None) or \
        _Cfunction('libvlc_video_get_track_description', ((1,),), None,
                    ctypes.POINTER(TrackDescription), MediaPlayer)
    return f(p_mi)
738709
public AbstractStreamParameters track(String track) {
		if (this.track.length() > 0) {
			this.track.append(',');
		}
		this.track.append(track);
		return this;
	}
396016
public void setModel(SoundCloudTrack track) {
        mModel = track;
        if (mModel != null) {
            Picasso.with(getContext())
                    .load(SoundCloudArtworkHelper.getArtworkUrl(mModel, SoundCloudArtworkHelper.XLARGE))
                    .placeholder(R.color.grey_light)
                    .fit()
                    .centerInside()
                    .into(mArtwork);
            mArtist.setText(mModel.getArtist());
            mTitle.setText(mModel.getTitle());
            long min = mModel.getDurationInMilli() / 60000;
            long sec = (mModel.getDurationInMilli() % 60000) / 1000;
            mDuration.setText(String.format(getResources().getString(R.string.duration), min, sec));
        }
    }
1304518
def libvlc_media_player_set_chapter(p_mi, i_chapter):
    '''
    '''
    f = _Cfunctions.get('libvlc_media_player_set_chapter', None) or \
        _Cfunction('libvlc_media_player_set_chapter', ((1,), (1,),), None,
                    None, MediaPlayer, ctypes.c_int)
    return f(p_mi, i_chapter)
521598
def _interpolate_stream_track(self):
        """"""
        if hasattr(self,'_interpolatedThetasTrack'):
            return None #Already did this
        TrackX= self._ObsTrack[:,0]*numpy.cos(self._ObsTrack[:,5])
        TrackY= self._ObsTrack[:,0]*numpy.sin(self._ObsTrack[:,5])
        TrackZ= self._ObsTrack[:,3]
        TrackvX, TrackvY, TrackvZ=\
            bovy_coords.cyl_to_rect_vec(self._ObsTrack[:,1],
                                        self._ObsTrack[:,2],
                                        self._ObsTrack[:,4],
                                        self._ObsTrack[:,5])
        #Interpolate
        self._interpTrackX=\
            interpolate.InterpolatedUnivariateSpline(self._thetasTrack,
                                                     TrackX,k=3)
        self._interpTrackY=\
            interpolate.InterpolatedUnivariateSpline(self._thetasTrack,
                                                     TrackY,k=3)
        self._interpTrackZ=\
            interpolate.InterpolatedUnivariateSpline(self._thetasTrack,
                                                     TrackZ,k=3)
        self._interpTrackvX=\
            interpolate.InterpolatedUnivariateSpline(self._thetasTrack,
                                                     TrackvX,k=3)
        self._interpTrackvY=\
            interpolate.InterpolatedUnivariateSpline(self._thetasTrack,
                                                     TrackvY,k=3)
        self._interpTrackvZ=\
            interpolate.InterpolatedUnivariateSpline(self._thetasTrack,
                                                     TrackvZ,k=3)
        #Now store an interpolated version of the stream track
        self._interpolatedThetasTrack=\
            numpy.linspace(0.,self._deltaAngleTrack,
                           self.nInterpolatedTrackChunks)
        self._interpolatedObsTrackXY= numpy.empty((len(self._interpolatedThetasTrack),6))
        self._interpolatedObsTrackXY[:,0]=\
            self._interpTrackX(self._interpolatedThetasTrack)
        self._interpolatedObsTrackXY[:,1]=\
            self._interpTrackY(self._interpolatedThetasTrack)
        self._interpolatedObsTrackXY[:,2]=\
            self._interpTrackZ(self._interpolatedThetasTrack)
        self._interpolatedObsTrackXY[:,3]=\
            self._interpTrackvX(self._interpolatedThetasTrack)
        self._interpolatedObsTrackXY[:,4]=\
            self._interpTrackvY(self._interpolatedThetasTrack)
        self._interpolatedObsTrackXY[:,5]=\
            self._interpTrackvZ(self._interpolatedThetasTrack)
        #Also in cylindrical coordinates
        self._interpolatedObsTrack= \
            numpy.empty((len(self._interpolatedThetasTrack),6))
        tR,tphi,tZ= bovy_coords.rect_to_cyl(self._interpolatedObsTrackXY[:,0],
                                            self._interpolatedObsTrackXY[:,1],
                                            self._interpolatedObsTrackXY[:,2])
        tvR,tvT,tvZ=\
            bovy_coords.rect_to_cyl_vec(self._interpolatedObsTrackXY[:,3],
                                        self._interpolatedObsTrackXY[:,4],
                                        self._interpolatedObsTrackXY[:,5],
                                        tR,tphi,tZ,cyl=True)
        self._interpolatedObsTrack[:,0]= tR
        self._interpolatedObsTrack[:,1]= tvR
        self._interpolatedObsTrack[:,2]= tvT
        self._interpolatedObsTrack[:,3]= tZ
        self._interpolatedObsTrack[:,4]= tvZ
        self._interpolatedObsTrack[:,5]= tphi
        return None
1324117
public Track getTrack(int trackID) throws MusixMatchException {
		Track track = new Track();
		Map<String, Object> params = new HashMap<String, Object>();

		params.put(Constants.API_KEY, apiKey);
		params.put(Constants.TRACK_ID, new String("" + trackID));

		track = getTrackResponse(Methods.TRACK_GET, params);

		return track;
	}
578590
def parse_track_header(self, fp):
        """"""
        # Check the header
        try:
            h = fp.read(4)
            self.bytes_read += 4
        except:
            raise IOError("Couldn't read track header from file. Byte %d."
                    % self.bytes_read)
        if h != 'MTrk':
            raise HeaderError('Not a valid Track header. Byte %d.'
                    % self.bytes_read)

        # Parse the size of the header
        try:
            chunk_size = fp.read(4)
            self.bytes_read += 4
        except:
            raise IOError("Couldn't read track chunk size from file.")
        chunk_size = self.bytes_to_int(chunk_size)
        return chunk_size
1135360
def set_recording(is_recording): #pylint: disable=redefined-outer-name
    
    prev = ctypes.c_int()
    check_call(_LIB.MXAutogradSetIsRecording(
        ctypes.c_int(is_recording), ctypes.byref(prev)))
    return bool(prev.value)
1240896
def play_Tracks(self, tracks, channels, bpm=120):
        
        self.notify_listeners(self.MSG_PLAY_TRACKS, {'tracks': tracks,
            'channels': channels, 'bpm': bpm})

        # Set the right instruments
        for x in range(len(tracks)):
            instr = tracks[x].instrument
            if isinstance(instr, MidiInstrument):
                try:
                    i = instr.names.index(instr.name)
                except:
                    i = 1
                self.set_instrument(channels[x], i)
            else:
                self.set_instrument(channels[x], 1)
        current_bar = 0
        max_bar = len(tracks[0])

        # Play the bars
        while current_bar < max_bar:
            playbars = []
            for tr in tracks:
                playbars.append(tr[current_bar])
            res = self.play_Bars(playbars, channels, bpm)
            if res != {}:
                bpm = res['bpm']
            else:
                return {}
            current_bar += 1
        return {'bpm': bpm}
549010
def song_play(self, song):
		

		if 'storeId' in song:
			song_id = song['storeId']
		elif 'trackId' in song:
			song_id = song['trackId']
		else:
			song_id = song['id']

		song_duration = song['durationMillis']

		event = mc_calls.ActivityRecordRealtime.play(song_id, song_duration)
		response = self._call(
			mc_calls.ActivityRecordRealtime,
			event
		)

		return True if response.body['eventResults'][0]['code'] == 'OK' else False
204749
function(track, beatInd) {
  var event = clock.callbackAtTime(function(event) {
    var bufferNode = soundBank[track].createNode()
    bufferNode.start(event.deadline)
  }, nextBeatTime(beatInd))
  event.repeat(barDur)
  event.tolerance({late: 0.01})
  beats[track][beatInd] = event
}
1132443
public void play(SoundCloudTrack track) {
        checkState();
        ArrayList<SoundCloudTrack> tracks = mPlayerPlaylist.getPlaylist().getTracks();
        int position = tracks.indexOf(track);
        if (position > -1) {
            mPlayerPlaylist.setPlayingTrack(position);
            PlaybackService.play(getContext(), mClientKey, track);
        }
    }
713566
function(track) {
  var request = new XMLHttpRequest()
  request.open('GET', 'sounds/' + track + '.wav', true)
  request.responseType = 'arraybuffer'
  request.onload = function() {
    context.decodeAudioData(request.response, function(buffer) {
      var createNode = function() {
        var node = context.createBufferSource()
        node.buffer = buffer
        node.connect(context.destination)
        return node
      }
      soundBank[track] = { createNode: createNode }
    })
  }
  request.send()
}
277292
public void setTracking (boolean track)
    {
        if (track != _tracking) {
            _tracking = track;
            if (track) {
                _seenKeys = new HashSet<K>();
                _misses = _hits = 0;

                // oh boy, but to properly track we need to clear the hash
                clear();
            } else {
                _seenKeys = null;
            }
        }
    }
248403
function parseTrack(cursor) {
    var chunk, events = [],
        result, runningStatus = null;

    chunk = parseChunk('MTrk', cursor);

    while (!chunk.eof()) {
        result = parseEvent(chunk, runningStatus);
        runningStatus = result.runningStatus;

        events.push(result.event);
    }

    return new Track(events);
}