forked from beyond-all-reason/Beyond-All-Reason
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'beyond-all-reason:master' into master
- Loading branch information
Showing
886 changed files
with
25,704 additions
and
5,408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Translations rebase from master | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '15 5 * * 1' | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Git User | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
- name: Transifex Rebase | ||
run: | | ||
git checkout transifex-synchronization-source | ||
git reset origin/master --hard | ||
git push origin transifex-synchronization-source --force-with-lease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,7 @@ | |
/.git | ||
/.svn | ||
.vscode/ | ||
.idea/ | ||
*.iml | ||
.project | ||
*.code-workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- Small library for getting the metadata of .wav files | ||
-- Author: Beherith [email protected] | ||
-- Based on http://soundfile.sapp.org/doc/WaveFormat/ | ||
|
||
local wavCache = {} -- A table keyed with the absolute path to the filename, | ||
|
||
|
||
function ReadWAV(fname) | ||
if wavCache[fname] then | ||
return wavCache[fname] | ||
end | ||
if not VFS.FileExists(fname) then | ||
Spring.Echo("ReadWAV: File does not exist:", fname) | ||
return nil | ||
end | ||
local data = VFS.LoadFile(fname) | ||
local ChunkID = string.sub(data, 1, 4) | ||
local ChunkSize = VFS.UnpackU32(string.sub(data,5,8)) | ||
local Format = string.sub(data, 9, 12) | ||
if ChunkID == "RIFF" and Format == "WAVE" then | ||
local NumChannels = VFS.UnpackU16(string.sub(data, 23, 24)) | ||
local SampleRate = VFS.UnpackU32(string.sub(data, 25, 28)) | ||
local BitsPerSample = VFS.UnpackU16(string.sub(data, 35, 36)) | ||
--Spring.Echo(fname, ChunkID, ChunkSize, Format, NumChannels, SampleRate, BitsPerSample) | ||
|
||
local Length = (ChunkSize - 36) / (SampleRate * NumChannels *(BitsPerSample/8)) | ||
--Spring.Echo(Length) | ||
wavCache[fname] = { | ||
NumChannels = NumChannels, | ||
SampleRate = SampleRate, | ||
BitsPerSample = BitsPerSample, | ||
Length = Length | ||
} | ||
return wavCache[fname] | ||
else | ||
Spring.Echo("ReadWAV: File is not a RIFF .wav file:", fname) | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.