Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ jobs:
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
curl -O https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz
tar -xf panda3d-1.10.15-tools-mac.tar.gz
mv panda3d-1.10.15/thirdparty thirdparty
rmdir panda3d-1.10.15
curl -O https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-mac.tar.gz
tar -xf panda3d-1.10.16-tools-mac.tar.gz
mv panda3d-1.10.16/thirdparty thirdparty
rmdir panda3d-1.10.16

# Temporary hack so that pzip can run, since we are about to remove Cg anyway.
install_name_tool -id "$(pwd)/thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib" thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib
Expand Down Expand Up @@ -134,16 +134,16 @@ jobs:
uses: actions/cache@v5
with:
path: thirdparty
key: ci-cmake-${{ runner.OS }}-thirdparty-v1.10.15-r1
key: ci-cmake-${{ runner.OS }}-thirdparty-v1.10.16-r1
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
if (!(Test-Path thirdparty/win-libs-vc14-x64)) {
$wc = New-Object System.Net.WebClient
$wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip")
$wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win64.zip", "thirdparty-tools.zip")
Expand-Archive -Path thirdparty-tools.zip
Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination .
Move-Item -Path thirdparty-tools/panda3d-1.10.16/thirdparty -Destination .
}

- name: ccache (non-Windows)
Expand Down
2 changes: 1 addition & 1 deletion dtool/Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ mark_as_advanced(SIMULATE_NETWORK_DELAY DO_MEMORY_USAGE DO_DCAST)
# The following options have to do with the memory allocation system.
#

find_package(MIMALLOC 1.0 QUIET)
find_package(MIMALLOC QUIET)

package_option(MIMALLOC
"The mimalloc allocator. See also USE_MEMORY_MIMALLOC, which
Expand Down
2 changes: 2 additions & 0 deletions dtool/Package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ if(THIRDPARTY_DIRECTORY)
HarfBuzz
JPEG
LibSquish
MIMALLOC
ODE
Ogg
OpenAL
Expand All @@ -106,6 +107,7 @@ if(THIRDPARTY_DIRECTORY)
PNG
SWResample
SWScale
Tiff
TIFF
VorbisFile
VRPN
Expand Down
1 change: 1 addition & 0 deletions makepanda/makepanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ def parseopts(args):
if not os.path.isfile(GetThirdpartyDir() + "openal/bin/OpenAL32.dll"):
# Link OpenAL Soft statically.
DefSymbol("OPENAL", "AL_LIBTYPE_STATIC")
LibName("OPENAL", "avrt.lib")
if (PkgSkip("ODE")==0):
LibName("ODE", GetThirdpartyDir() + "ode/lib/ode_single.lib")
DefSymbol("ODE", "dSINGLE", "")
Expand Down
22 changes: 14 additions & 8 deletions tests/audio/test_loading.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import os, sys

import pytest
from panda3d.core import Filename
from panda3d.core import Filename, MovieAudio


def test_missing_file(audiomgr):
Expand All @@ -20,16 +20,22 @@ def test_comments(audiomgr, extension):
os.path.dirname(__file__), f"openclose_with_comments.{extension}"
)
sound_path = Filename.from_os_specific(sound_path)
sound = audiomgr.get_sound(sound_path)
audio = MovieAudio.get(sound_path)
if str(audio) == 'Load-Failure Stub':
pytest.skip("Could not load audio file")
sound = audiomgr.get_sound(audio)
if str(sound).startswith("NullAudioSound"):
pytest.skip("Sound loading failed")
if extension == "mp3": # FFMPEG encodes/decodes tags differently
tags = ["artist", "comment", "genre"]
else:
tags = ["ARTIST", "COMMENTS", "GENRE"]
assert sorted(sound.raw_comments) == [
f"{tags[0]}=Example Artist",
f"{tags[1]}=This is an example OGG comment",
f"{tags[2]}=Blues",
]

comments = frozenset(sound.raw_comments)
assert f"{tags[0]}=Example Artist" in comments
if sys.platform != "win32" or extension != "mp3":
assert f"{tags[1]}=This is an example OGG comment" in comments
assert f"{tags[2]}=Blues" in comments
assert sound.comments[tags[-1]] == "Blues"
assert sound.get_comment(tags[0]) == "Example Artist"
assert sound.get_comment("DOES NOT EXIST") == ""
Expand Down
Loading