function playSound(snd)

global soundID;

if isempty(snd) % play no sound (= stop) by calling playSound([])
    if ~isempty(soundID)
        stop(soundID);
    end
    
else
    if isempty(snd.vect) % read sound (if ~DOWNLOAD)
        if isempty(snd.path)
            snd.path=cd;
        end
        
        [svect,sFs] = audioread([snd.path snd.name '.wav']);
        curSample = get(soundID,'CurrentSample');
        if length(curSample)<1 % if empty vector (first time)
            curSample = 1;
        else if curSample > length(svect)-0.5*sFs % if near end
                curSample = 1;
            end
        end
        soundID = audioplayer(svect,sFs, 24); % 24 bit, default device
        stop(soundID);
        play(soundID, curSample);
        
        
        % CLEAN UP
    else
        curSample = get(soundID,'CurrentSample');
        if length(curSample)<1 % if empty vector (first time)
            curSample = 1;
        else if curSample > length(snd.vect)-25000 % if near end
                curSample = 1;
            end
        end
        soundID = audioplayer(snd.vect,snd.fs, 24); % 24 bit, default device
        stop(soundID);
        play(soundID, curSample);
    end
    
    % TODO after this: button back to green?
    
end