mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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
|
package audio
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten/exp/audio/inner"
|
"github.com/hajimehoshi/ebiten/internal/audio"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SampleRate returns the sampling frequency (e.g. 44100).
|
// SampleRate returns the sampling frequency (e.g. 44100).
|
||||||
func SampleRate() int {
|
func SampleRate() int {
|
||||||
return internal.SampleRate
|
return audio.SampleRate
|
||||||
}
|
}
|
||||||
|
|
||||||
// MaxChannel is a max number of channels.
|
// MaxChannel is a max number of channels.
|
||||||
var MaxChannel = internal.MaxChannel
|
var MaxChannel = audio.MaxChannel
|
||||||
|
|
||||||
// Play appends the given data to the given channel.
|
// 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.
|
// This function is useful to play SE or a note of PCM synthesis immediately.
|
||||||
func Play(channel int, data []byte) bool {
|
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.
|
// 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.
|
// This function is useful to play streaming data.
|
||||||
func Queue(channel int, data []byte) {
|
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.
|
// IsPlaying returns a boolean value which indicates if the channel buffer has data to play.
|
||||||
func IsPlaying(channel int) bool {
|
func IsPlaying(channel int) bool {
|
||||||
return internal.IsPlaying(channel)
|
return audio.IsPlaying(channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add Clear function
|
// TODO: Add Clear function
|
||||||
|
2
init.go
2
init.go
@ -15,7 +15,7 @@
|
|||||||
package ebiten
|
package ebiten
|
||||||
|
|
||||||
import (
|
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/graphics/opengl"
|
||||||
"github.com/hajimehoshi/ebiten/internal/ui"
|
"github.com/hajimehoshi/ebiten/internal/ui"
|
||||||
)
|
)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package internal
|
package audio
|
||||||
|
|
||||||
var audioEnabled = false
|
var audioEnabled = false
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// +build js
|
// +build js
|
||||||
|
|
||||||
package internal
|
package audio
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gopherjs/gopherjs/js"
|
"github.com/gopherjs/gopherjs/js"
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// +build !js,!windows
|
// +build !js,!windows
|
||||||
|
|
||||||
package internal
|
package audio
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package internal
|
package audio
|
||||||
|
|
||||||
func withChannels(f func()) {
|
func withChannels(f func()) {
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user