Removed all excess whitespace and standardized line endings.

This commit is contained in:
m3rein
2020-09-05 21:23:16 +02:00
parent caed5bd757
commit 240af4e5e7
219 changed files with 929 additions and 929 deletions

View File

@@ -144,7 +144,7 @@ module AudioState
def self.pitch; @pitch; end
def self.volume; @volume; end
def self.waitingBGM=(value);
def self.waitingBGM=(value);
Thread.exclusive { @waitingBGM=value; }
end
@@ -245,7 +245,7 @@ def Audio_me_fade(ms)
end
def Audio_me_stop()
AudioState::AudioContextStop.call(AudioState.meContext)
AudioState::AudioContextStop.call(AudioState.meContext)
end
def Audio_bgs_play(name, volume, pitch, position = 0)
@@ -264,7 +264,7 @@ def Audio_bgs_fade(ms)
end
def Audio_bgs_stop()
AudioState::AudioContextStop.call(AudioState.bgsContext)
AudioState::AudioContextStop.call(AudioState.bgsContext)
end
def Audio_se_play(name, volume, pitch, position = 0)
@@ -279,7 +279,7 @@ def Audio_se_play(name, volume, pitch, position = 0)
end
def Audio_se_stop()
AudioState::AudioContextStop.call(AudioState.seContext)
AudioState::AudioContextStop.call(AudioState.seContext)
end

View File

@@ -13,7 +13,7 @@ def pbStringToAudioFile(str)
end
end
# Converts an object to an audio file.
# Converts an object to an audio file.
# str -- Either a string showing the filename or an RPG::AudioFile object.
# Possible formats for _str_:
# filename volume and pitch 100
@@ -41,7 +41,7 @@ end
################################################################################
# Plays a BGM file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/BGM/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -91,7 +91,7 @@ end
################################################################################
# Plays an ME file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/ME/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -140,7 +140,7 @@ end
################################################################################
# Plays a BGS file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/BGS/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -189,7 +189,7 @@ end
################################################################################
# Plays an SE file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/SE/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -289,4 +289,4 @@ def pbPlayCloseMenuSE
if FileTest.audio_exist?("Audio/SE/GUI menu close")
pbSEPlay("GUI menu close",80)
end
end
end

View File

@@ -17,7 +17,7 @@ Parameters:
freq - the frequency of the sound in Hz. The higher the frequency,
the higher the pitch. If 0, no sound will be generated.
The module Audio::Note contains useful frequencies for tones.
freq can also be a SoundEnvelope or an array of two element arrays,
freq can also be a SoundEnvelope or an array of two element arrays,
as follows:
freq[0] - time in ms to apply the specified frequency
freq[1] - frequency to apply. In between, values will be interpolated
@@ -26,7 +26,7 @@ Parameters:
async - specifies whether the function will return immediately
without waiting for the sound to finish (stands for asynchronous)
timbre - specifies the timbre of the tone; from 0.0 through 1.0
timbre can also be a SoundEnvelope or an array of two element arrays,
timbre can also be a SoundEnvelope or an array of two element arrays,
as follows:
volume[0] - time in ms to apply the specified timbre
volume[1] - timbre to apply. In between, values will be interpolated
@@ -206,7 +206,7 @@ class NoteEnvelope
def sweeping(duration,sweepDuration)
return self if duration<=0
return steady(duration) if sweepDuration<=0
@envelope.changeDiscrete(0,@maxPoint)
@envelope.changeDiscrete(0,@maxPoint)
falling=true
while duration>0
dur=duration>sweepDuration ? sweepDuration : duration
@@ -368,13 +368,13 @@ class SoundEnvelope; include Enumerable
# duration - duration of the sound
# attack - attack time (in ms), or time between the start of the sound
# and the time where the sound reaches its maximum volume.
# If this value is less than 0, the sound will decay from silence to
# If this value is less than 0, the sound will decay from silence to
# the sustain volume instead (see below).
# decay - decay time (in ms), or time after the attack phase until
# the time where the sound reaches its sustain volume
# sustain - sustain volume, or normal volume of sound (0-100)
# release - release time (in ms), or amount of time to fade out the
# sound when it reaches its end. The sound's duration includes its
# release - release time (in ms), or amount of time to fade out the
# sound when it reaches its end. The sound's duration includes its
# release time.
def self.attackDecayRelease(duration,attack,decay,sustain,release)
env=self.new
@@ -396,7 +396,7 @@ class SoundEnvelope; include Enumerable
return self.new.addValueChanges(
value,onDuration,0,offDuration).repeat(totalDuration)
end
def change(delta,volume)
return self if delta<0
velength=@e.length
@@ -528,7 +528,7 @@ class SoundEnvelopeIterator# :nodoc:
def getValue(frame)
value=0
if @envIndex==@env.length
value=@env[@envIndex-1][1]
value=@env[@envIndex-1][1]
elsif @envIndex==0
value=@env[@envIndex][1]
else
@@ -539,7 +539,7 @@ class SoundEnvelopeIterator# :nodoc:
thisVolume=@env[@envIndex][1]
value=(thisVolume-lastVolume)*(frame-lastPos)/(thisPos-lastPos)+lastVolume
else
value=@env[@envIndex][1]
value=@env[@envIndex][1]
end
end
while @envIndex+1<=@env.length && @env[@envIndex][0]==frame.to_i
@@ -652,7 +652,7 @@ class WaveForm# :nodoc:
@exactCounter+=@step
while @exactCounter>1.0; @exactCounter-=1.0; end
end
def mixSamples(other)
for i in 0...other.sampleCount
newSamp=((@samples[i]-0x80)+(other.samples[i]-0x80))/2+0x80
@@ -806,7 +806,7 @@ module Audio
timbre1,timbre2,@@sineProc2,@@sineProc2,async)
end
@@noiseProc2 = proc { |i,timbre|
@@noiseProc2 = proc { |i,timbre|
n = (rand(256)/255.0)*0.1
next (rand(2)==0) ? 1-n : -1+n
}
@@ -1293,7 +1293,7 @@ end
###############################
begin
MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l')
MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l')
MciErrorString = Win32API.new('winmm','mciGetErrorString','%w(l,p,l)','l')
rescue
MciSendString = nil
@@ -1347,4 +1347,4 @@ def endRecord(file)
MciSendString.call("close RECORDER",0,0,0)
end
#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50)
#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50)