mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-08-04 09:30:25 +00:00
Merge branch 'QB64-Phoenix-Edition:main' into audio-enhancements
This commit is contained in:
commit
5692d476b4
1 changed files with 9 additions and 16 deletions
|
@ -1500,23 +1500,16 @@ void sub_sound(double frequency, double lengthInClockTicks) {
|
||||||
audioEngine.waveform->AwaitPlaybackCompletion();
|
audioEngine.waveform->AwaitPlaybackCompletion();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// @brief This generates a default 'beep' sound
|
||||||
/// This generates a default 'beep' sound.
|
void sub_beep() {
|
||||||
/// </summary>
|
sub_sound(900, 4.5);
|
||||||
void sub_beep() { sub_sound(900, 5); }
|
sub_sound(32767, 0.5); // we'll send a very short silence after the beep so that two successive beeps sound unique
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// @brief This was designed to returned the number of notes in the background music queue.
|
||||||
/// This was designed to returned the number of notes in the background music queue.
|
/// However, here we'll just return the number of sample frame remaining to play when Play(), Sound() or Beep() are used
|
||||||
/// However, here we'll just return the number of sample frame remaining to play when Play(), Sound() or Beep() are used.
|
/// @param ignore Well, it's ignored
|
||||||
/// This allows programs like the following to compile and work.
|
/// @return Returns the number of sample frames left to play for Play(), Sound() & Beep()
|
||||||
///
|
|
||||||
/// Music$ = "MBT180o2P2P8L8GGGL2E-P24P8L8FFFL2D"
|
|
||||||
/// PLAY Music$
|
|
||||||
/// WHILE PLAY(0) > 5: WEND
|
|
||||||
/// PRINT "Just about done!"
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="ignore">Well, it's ignored</param>
|
|
||||||
/// <returns>Returns the number of sample frames left to play for Play(), Sound() & Beep()</returns>
|
|
||||||
int32_t func_play(int32_t ignore) {
|
int32_t func_play(int32_t ignore) {
|
||||||
if (audioEngine.isInitialized && audioEngine.sndInternal == 0 && audioEngine.soundHandles[audioEngine.sndInternal]->rawStream) {
|
if (audioEngine.isInitialized && audioEngine.sndInternal == 0 && audioEngine.soundHandles[audioEngine.sndInternal]->rawStream) {
|
||||||
return (int32_t)audioEngine.soundHandles[audioEngine.sndInternal]->rawStream->GetSampleFramesRemaining();
|
return (int32_t)audioEngine.soundHandles[audioEngine.sndInternal]->rawStream->GetSampleFramesRemaining();
|
||||||
|
|
Loading…
Reference in a new issue