audio: Move files from exp/audio/inner to internal/audio

This commit is contained in:
Hajime Hoshi 2016-02-07 16:03:33 +09:00
parent b33d5c5393
commit a83286accb
7 changed files with 12 additions and 12 deletions

View File

@ -15,16 +15,16 @@
package audio
import (
"github.com/hajimehoshi/ebiten/exp/audio/inner"
"github.com/hajimehoshi/ebiten/internal/audio"
)
// SampleRate returns the sampling frequency (e.g. 44100).
func SampleRate() int {
return internal.SampleRate
return audio.SampleRate
}
// MaxChannel is a max number of channels.
var MaxChannel = internal.MaxChannel
var MaxChannel = audio.MaxChannel
// Play appends the given data to the given channel.
//
@ -35,7 +35,7 @@ var MaxChannel = internal.MaxChannel
//
// This function is useful to play SE or a note of PCM synthesis immediately.
func Play(channel int, data []byte) bool {
return internal.Play(channel, data)
return audio.Play(channel, data)
}
// Queue queues the given data to the given channel.
@ -47,12 +47,12 @@ func Play(channel int, data []byte) bool {
//
// This function is useful to play streaming data.
func Queue(channel int, data []byte) {
internal.Queue(channel, data)
audio.Queue(channel, data)
}
// IsPlaying returns a boolean value which indicates if the channel buffer has data to play.
func IsPlaying(channel int) bool {
return internal.IsPlaying(channel)
return audio.IsPlaying(channel)
}
// TODO: Add Clear function

View File

@ -15,7 +15,7 @@
package ebiten
import (
audio "github.com/hajimehoshi/ebiten/exp/audio/inner"
"github.com/hajimehoshi/ebiten/internal/audio"
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
"github.com/hajimehoshi/ebiten/internal/ui"
)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package internal
package audio
var audioEnabled = false

View File

@ -14,7 +14,7 @@
// +build js
package internal
package audio
import (
"github.com/gopherjs/gopherjs/js"

View File

@ -14,7 +14,7 @@
// +build !js,!windows
package internal
package audio
import (
"fmt"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package internal
package audio
func withChannels(f func()) {
}

2
run.go
View File

@ -15,7 +15,7 @@
package ebiten
import (
audio "github.com/hajimehoshi/ebiten/exp/audio/inner"
"github.com/hajimehoshi/ebiten/internal/audio"
"github.com/hajimehoshi/ebiten/internal/ui"
"time"
)