Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audiodecoder API Version 4.0.0 update #31

Merged
merged 3 commits into from
Nov 6, 2021
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
16 changes: 13 additions & 3 deletions audiodecoder.fluidsynth/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="audiodecoder.fluidsynth"
version="20.0.1"
version="20.1.0"
name="FluidSynth MIDI Audio Decoder"
provider-name="spiff">
<requires>@ADDON_DEPENDS@</requires>
<extension
point="kodi.audiodecoder"
name="fluid"
tags="true"
extension=".mid|.kar"
library_@PLATFORM@="@LIBRARY_FILENAME@"/>
library_@PLATFORM@="@LIBRARY_FILENAME@">
<support>
<extension name=".mid">
<description>30100</description>
</extension>
<extension name=".kar">
<description>30101</description>
</extension>
</support>
</extension>
<extension point="xbmc.addon.metadata">
<platform>@PLATFORM@</platform>
<license>GPL-2.0-or-later</license>
Expand All @@ -27,12 +35,14 @@
<summary lang="nl_NL">Een Geluidsfont synthesizer</summary>
<summary lang="pl_PL">Syntezator SoundFont</summary>
<summary lang="ru_RU">SoundFont синтезатор</summary>
<summary lang="zh_CN">一个音色库合成器</summary>
<description lang="da_DK">FluidSynth er en software-synthesizer i realtid baseret på SoundFont 2-specifikationerne og har nået en bred distribution. FluidSynth har ikke selv en grafisk brugerflade, men på grund af sin kraftige API benytter flere applikationer sig af den, og den har endda fundet vej til integrerede systemer og bruges i nogle mobile apps.</description>
<description lang="de_DE">FluidSynth ist ein Echtzeit-Software-Synthesizer, der auf den SoundFont 2-Spezifikationen basiert und eine weit verbreitete Verbreitung erreicht hat. FluidSynth selbst verfügt nicht über eine grafische Benutzeroberfläche, wird jedoch aufgrund seiner leistungsstarken API von mehreren Anwendungen verwendet und hat sogar den Weg in eingebettete Systeme gefunden und wird in einigen mobilen Apps verwendet.</description>
<description lang="en_GB">FluidSynth is a real-time software synthesizer based on the SoundFont 2 specifications and has reached widespread distribution. FluidSynth itself does not have a graphical user interface, but due to its powerful API several applications utilize it and it has even found its way onto embedded systems and is used in some mobile apps.</description>
<description lang="es_ES">FluidSynt es un sintetizador software en tiempo real basado en las especificaciones SoundFont 2 que ha alcanzado una gran popularidad. FluidSynth no tiene interfaz gráfica de usuario por si solo, pero debido a su poderosa API muchas aplicaciones lo usan e incluso se usa en sistemas embebidos y en aplicaciones móviles.</description>
<description lang="ko_KR">FluidSynth는 SoundFont 2 규격에 따른 실시간 신시사이저 소프트웨어로서 널리 보급되어 있습니다. FluidSynth 자체에는 GUI가 없지만, 강력한 API 덕분에 여러개의 어플리케이션에서 사용 중이며 심지어 임베디드 시스템이나 모바일 앱에서도 사용 중입니다.</description>
<description lang="pl_PL">FluidSynth to programowy syntezator czasu rzeczywistego oparty na specyfikacjach SoundFont 2, który jest szeroko rozpowszechniony. Sam FluidSynth nie ma graficznego interfejsu użytkownika, ale ze względu na jego potężne API korzysta z niego kilka aplikacji, a nawet znalazł się w systemach wbudowanych i jest używany w niektórych aplikacjach mobilnych.</description>
<description lang="ru_RU">FluidSynth - это программный синтезатор реального времени, основанный на спецификации SoundFont 2 и получивший широкое распространение. Сам FluidSynth не имеет графического интерфейса, но благодаря мощному API его используют различные приложения, он также нашёл свое применение во встроенных системах и используется в некоторых мобильных приложениях.</description>
<description lang="zh_CN">FluidSynth 是一款已广泛发行的基于 SoundFont 2 规范的实时软件合成器。FluidSynth 本身没有图形用户界面,但因其强大的 API 而被一些应用程序所使用,甚至找到了在在嵌入式系统上使用的方法,并在一些移动应用程序中使用。</description>
</extension>
</addon>
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@ msgstr ""
msgctxt "#30011"
msgid "Soundfont not configured, check add-on settings."
msgstr ""

#. Supported file extension description about ".mid"
#: audiodecoder.fluidsynth/addon.xml.in
msgctxt "#30100"
msgid "Is a MIDI (Musical Instrument Digital Interface) file used by music authoring, mixing programs and hardware devices."
msgstr ""

#. Supported file extension description about ".kar"
#: audiodecoder.fluidsynth/addon.xml.in
msgctxt "#30101"
msgid "Karaoke MIDI File - Contains MIDI data as well as song lyrics stored in text."
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
msgid ""
msgstr ""
"Project-Id-Version: KODI Addons\n"
"Report-Msgid-Bugs-To: https://github.com/xbmc/audiodecoder.fluidsynth/issues/"
"\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"PO-Revision-Date: 2021-09-17 02:30+0000\n"
"Last-Translator: taxigps <[email protected]>\n"
"Language-Team: Chinese (China) <https://kodi.weblate.cloud/projects/kodi-add-ons-audio-decodersencoders/audiodecoder-fluidsynth/zh_cn/>\n"
"Language: zh_cn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.8\n"

msgctxt "Addon Summary"
msgid "A SoundFont Synthesizer"
msgstr ""
msgstr "一个音色库合成器"

msgctxt "Addon Description"
msgid "FluidSynth is a real-time software synthesizer based on the SoundFont 2 specifications and has reached widespread distribution. FluidSynth itself does not have a graphical user interface, but due to its powerful API several applications utilize it and it has even found its way onto embedded systems and is used in some mobile apps."
msgstr ""
msgstr "FluidSynth 是一款已广泛发行的基于 SoundFont 2 规范的实时软件合成器。FluidSynth 本身没有图形用户界面,但因其强大的 API 而被一些应用程序所使用,甚至找到了在在嵌入式系统上使用的方法,并在一些移动应用程序中使用。"

#[Consistency] Make terms, settings names, brands and other minutiae, consistent throughout file.
#[Capitalization] Avoid capitalizing every second word. See http://grammarist.com/capitalization/
Expand All @@ -34,24 +34,24 @@ msgstr ""
#For example, "Press \"OK\" for \"All seasons\"" instead of "Press OK for All seasons" after first word.
msgctxt "#30000"
msgid "Soundfont"
msgstr ""
msgstr "音色库"

msgctxt "#30001"
msgid "To use FluidSynth you need a working sound font."
msgstr ""
msgstr "使用 FluidSynth 需要有在用的音色库。"

msgctxt "#30002"
msgid "Scan MIDI for title"
msgstr ""
msgstr "扫描 MIDI 以查找标题"

msgctxt "#30003"
msgid "Search in MIDI file for information to get an exact title."
msgstr ""
msgstr "在 MIDI 文件中搜索信息以获得确切的标题。"

msgctxt "#30010"
msgid "SoundFont audio decode"
msgstr ""
msgstr "音色库音频解码"

msgctxt "#30011"
msgid "Soundfont not configured, check add-on settings."
msgstr ""
msgstr "音色库未配置,检查插件设置。"
8 changes: 4 additions & 4 deletions src/FluidDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ bool CFluidCodec::Init(const std::string& filename,
return true;
}

int CFluidCodec::ReadPCM(uint8_t* buffer, int size, int& actualsize)
int CFluidCodec::ReadPCM(uint8_t* buffer, size_t size, size_t& actualsize)
{
if (fluid_player_get_status(ctx.player) == FLUID_PLAYER_DONE)
return 1;
return AUDIODECODER_READ_EOF;

fluid_synth_write_float(ctx.synth, size / 8, buffer, 0, 2, buffer, 1, 2);
actualsize = size;
return 0;
return AUDIODECODER_READ_SUCCESS;
}

bool CFluidCodec::ReadTag(const std::string& filename, kodi::addon::AudioDecoderInfoTag& tag)
Expand Down Expand Up @@ -177,7 +177,7 @@ bool CFluidCodec::ReadTag(const std::string& filename, kodi::addon::AudioDecoder

//------------------------------------------------------------------------------

class ATTRIBUTE_HIDDEN CMyAddon : public kodi::addon::CAddonBase
class ATTR_DLL_LOCAL CMyAddon : public kodi::addon::CAddonBase
{
public:
CMyAddon() = default;
Expand Down
4 changes: 2 additions & 2 deletions src/FluidDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct FluidContext
fluid_player_t* player = nullptr;
};

class ATTRIBUTE_HIDDEN CFluidCodec : public kodi::addon::CInstanceAudioDecoder
class ATTR_DLL_LOCAL CFluidCodec : public kodi::addon::CInstanceAudioDecoder
{
public:
CFluidCodec(KODI_HANDLE instance, const std::string& version);
Expand All @@ -47,7 +47,7 @@ class ATTRIBUTE_HIDDEN CFluidCodec : public kodi::addon::CInstanceAudioDecoder
int& bitrate,
AudioEngineDataFormat& format,
std::vector<AudioEngineChannel>& channellist) override;
int ReadPCM(uint8_t* buffer, int size, int& actualsize) override;
int ReadPCM(uint8_t* buffer, size_t size, size_t& actualsize) override;
int64_t Seek(int64_t time) override { return -1; }
bool ReadTag(const std::string& filename, kodi::addon::AudioDecoderInfoTag& tag) override;

Expand Down