Skip to content

Commit 3f7bef2

Browse files
committed
fix: Update plugin for latest Amplitude updates.
1 parent fedd2f5 commit 3f7bef2

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ jobs:
6868
archiver: "7z a"
6969
target_triplet: x64-windows
7070

71-
- name: "Windows Latest MinGW"
72-
os: windows-latest
73-
archiver: "7z a"
74-
target_triplet: x64-mingw-static
75-
7671
- name: "Ubuntu Latest GCC"
7772
os: ubuntu-latest
7873
archiver: "7z a"

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ cmake_minimum_required(VERSION 3.20)
1616

1717
cmake_policy(SET CMP0048 NEW)
1818

19-
if(EXISTS $ENV{AM_SDK_PATH})
19+
if (DEFINED AM_SDK_PATH)
20+
list(APPEND CMAKE_MODULE_PATH "${AM_SDK_PATH}/cmake")
21+
list(APPEND CMAKE_PREFIX_PATH "${AM_SDK_PATH}/cmake")
22+
endif()
23+
24+
if(DEFINED ENV{AM_SDK_PATH})
2025
string(REPLACE "\\" "/" ENV_AM_SDK_PATH $ENV{AM_SDK_PATH})
2126
list(APPEND CMAKE_MODULE_PATH "${ENV_AM_SDK_PATH}/cmake")
2227
list(APPEND CMAKE_PREFIX_PATH "${ENV_AM_SDK_PATH}/cmake")
2328
endif()
24-
25-
list(APPEND CMAKE_MODULE_PATH "${AM_SDK_PATH}/cmake")
26-
list(APPEND CMAKE_PREFIX_PATH "${AM_SDK_PATH}/cmake")
2729

2830
project(AmplitudeFlacCodecPlugin)
2931

Codec.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,22 +218,22 @@ AmUInt64 FlacCodec::FlacEncoder::Write(AudioBuffer* in, AmUInt64 offset, AmUInt6
218218

219219
Codec::Decoder* FlacCodec::CreateDecoder()
220220
{
221-
return ampoolnew(MemoryPoolKind::Codec, FlacDecoder, this);
221+
return ampoolnew(eMemoryPoolKind_Codec, FlacDecoder, this);
222222
}
223223

224224
void FlacCodec::DestroyDecoder(Decoder* decoder)
225225
{
226-
ampooldelete(MemoryPoolKind::Codec, FlacDecoder, (FlacDecoder*)decoder);
226+
ampooldelete(eMemoryPoolKind_Codec, FlacDecoder, (FlacDecoder*)decoder);
227227
}
228228

229229
Codec::Encoder* FlacCodec::CreateEncoder()
230230
{
231-
return ampoolnew(MemoryPoolKind::Codec, FlacEncoder, this);
231+
return ampoolnew(eMemoryPoolKind_Codec, FlacEncoder, this);
232232
}
233233

234234
void FlacCodec::DestroyEncoder(Encoder* encoder)
235235
{
236-
ampooldelete(MemoryPoolKind::Codec, FlacEncoder, (FlacEncoder*)encoder);
236+
ampooldelete(eMemoryPoolKind_Codec, FlacEncoder, (FlacEncoder*)encoder);
237237
}
238238

239239
bool FlacCodec::CanHandleFile(std::shared_ptr<File> file) const

Plugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ AM_API_PLUGIN bool RegisterPlugin(Engine* engine, MemoryManager* memoryManager)
5555
s_engine = engine;
5656
s_memoryManager = memoryManager;
5757

58-
s_flacCodec = ampoolnew(MemoryPoolKind::Engine, FlacCodec);
58+
s_flacCodec = ampoolnew(eMemoryPoolKind_Engine, FlacCodec);
5959

6060
return true;
6161
}
6262

6363
AM_API_PLUGIN bool UnregisterPlugin()
6464
{
65-
ampooldelete(MemoryPoolKind::Engine, FlacCodec, s_flacCodec);
65+
ampooldelete(eMemoryPoolKind_Engine, FlacCodec, s_flacCodec);
6666
s_flacCodec = nullptr;
6767

6868
s_engine = nullptr;

vcpkg.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/master/docs/vcpkg.schema.json",
32
"builtin-baseline": "7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3",
43
"name": "amplitude-plugin-codec-flac",
54
"description": "Amplitude plugin to encode and decode FLAC audio files.",

0 commit comments

Comments
 (0)