Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Track = {}
- function Track:new()
- Track.instanceTable = {
- [1] = {
- trackSnd = audio.loadStream( "Sound/Tracks/01.mp3" ),
- trackVolume = 100,
- trackName = "track_01.mp3",
- trackStart = {
- [1] = {5000, 1000},
- [2] = {15000, 1000},
- },
- },
- }
- function Track:play( track, trackBegin )
- Track.activeTrack = track
- track = Track.instanceTable[track]
- local snd = track.trackSnd
- local begin, stop = unpack(track.trackStart[trackBegin], 1, 2 )
- local seek = audio.seek(begin, snd)
- local c = audio.play(snd)
- audio.stopWithDelay(stop, c)
- end
- end
- return Track
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement