mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Minor refactoring to kill various Rubocop warnings
This commit is contained in:
@@ -79,7 +79,7 @@ def oggfiletime(file)
|
||||
end
|
||||
ret = 0.0
|
||||
for i in 0...pcmlengths.length
|
||||
ret += pcmlengths[i].to_f / rates[i].to_f
|
||||
ret += pcmlengths[i].to_f / rates[i]
|
||||
end
|
||||
return ret * 256.0
|
||||
end
|
||||
@@ -136,7 +136,7 @@ def getPlayTime2(filename)
|
||||
end
|
||||
file.pos = 0
|
||||
# Find the length of an MP3 file
|
||||
while true
|
||||
loop do
|
||||
rstr = ""
|
||||
ateof = false
|
||||
while !file.eof?
|
||||
|
||||
@@ -29,8 +29,8 @@ def pbResolveAudioFile(str,volume=nil,pitch=nil)
|
||||
end
|
||||
if str.is_a?(RPG::AudioFile)
|
||||
if volume || pitch
|
||||
return RPG::AudioFile.new(str.name,volume || str.volume || 100 ,
|
||||
pitch || str.pitch || 100)
|
||||
return RPG::AudioFile.new(str.name, volume || str.volume || 100,
|
||||
pitch || str.pitch || 100)
|
||||
else
|
||||
return str
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user