mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio: Move files from exp/audio/inner to internal/audio
This commit is contained in:
parent
b33d5c5393
commit
a83286accb
@ -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
|
||||
|
2
init.go
2
init.go
@ -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"
|
||||
)
|
||||
|
@ -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
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
// +build js
|
||||
|
||||
package internal
|
||||
package audio
|
||||
|
||||
import (
|
||||
"github.com/gopherjs/gopherjs/js"
|
@ -14,7 +14,7 @@
|
||||
|
||||
// +build !js,!windows
|
||||
|
||||
package internal
|
||||
package audio
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -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()) {
|
||||
}
|
Loading…
Reference in New Issue
Block a user