11/*
2- * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3- * (C) 2023 Vladimir Sadovnikov <[email protected] > 2+ * Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+ * (C) 2025 Vladimir Sadovnikov <[email protected] > 44 *
55 * This file is part of lsp-runtime-lib
66 * Created on: 19 апр. 2020 г.
@@ -37,17 +37,19 @@ namespace lsp
3737{
3838 namespace mm
3939 {
40- #ifndef USE_LIBSNDFILE
40+ #if defined(PLATFORM_WINDOWS)
4141 struct WAVEFILE ;
42- #endif /* USE_LIBSNDFILE */
42+ #endif /* PLATFORM_WINDOWS */
4343
4444 class InAudioFileStream : public IInAudioStream
4545 {
4646 protected:
47- #ifdef USE_LIBSNDFILE
48- typedef SNDFILE handle_t ;
49- #else
47+ #if defined(PLATFORM_WINDOWS)
5048 typedef struct WAVEFILE handle_t ;
49+ #elif defined(PLATFORM_MACOSX)
50+ typedef void handle_t ;
51+ #else
52+ typedef SNDFILE handle_t ;
5153 #endif
5254
5355 protected:
@@ -57,10 +59,12 @@ namespace lsp
5759 bool bSeekable;
5860
5961 protected:
60- #ifdef USE_LIBSNDFILE
61- static status_t decode_sf_error (SNDFILE *fd);
62- #else
62+ #if defined(PLATFORM_WINDOWS)
6363 ssize_t read_acm_convert (void *dst, size_t nframes, size_t fmt);
64+ #elif defined(PLATFORM_MACOSX)
65+ static status_t decode_os_status (uint32_t code);
66+ #else
67+ static status_t decode_sf_error (SNDFILE *fd);
6468 #endif
6569
6670 virtual ssize_t direct_read (void *dst, size_t nframes, size_t fmt) override ;
0 commit comments