com.github.bloodshura.x.assets.sound.codec.SoundCodec Maven / Gradle / Ivy
/*
* Copyright (c) 2013-2018, João Vitor Verona Biazibetti - All Rights Reserved
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* https://www.github.com/BloodShura
*/
package com.github.bloodshura.x.assets.sound.codec;
import com.github.bloodshura.x.assets.sound.Sound.PlayMode;
import com.github.bloodshura.x.assets.sound.exception.SoundException;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.time.Duration;
public interface SoundCodec {
@Nonnull
Duration getDuration();
double getGain();
double getPitch();
@Nonnull
Duration getPosition();
boolean isPlaying();
boolean isSetUp();
void play(@Nonnull PlayMode playMode) throws SoundException;
void setGain(double gain);
void setPitch(double pitch);
void setPosition(@Nonnull Duration duration);
void setup() throws IOException;
void stop() throws SoundException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy