lovr.audio.newSource
Creates a new Source from an ogg file.
source = lovr.audio.newSource(filename, type)
Arguments
Name | Type | Description |
filename | string | The filename of the sound to load.
|
type | SourceType | How to stream in audio data.
|
Returns
Name | Type | Description |
source | Source | The new Source.
|
source = lovr.audio.newSource(blob, type)
Arguments
Name | Type | Description |
blob | Blob | The Blob containing the Source data.
|
type | SourceType | How to stream in audio data.
|
Returns
Name | Type | Description |
source | Source | The new Source.
|
source = lovr.audio.newSource(stream, type)
Arguments
Name | Type | Description |
stream | AudioStream | The AudioStream used to stream audio data to the Source.
|
type | SourceType | How to stream in audio data.
|
Returns
Name | Type | Description |
source | Source | The new Source.
|
source = lovr.audio.newSource(soundData)
Arguments
Name | Type | Description |
soundData | SoundData | The SoundData containing raw audio samples to play.
|
Returns
Name | Type | Description |
source | Source | The new Source.
|
See also