Skip to content

Commit

Permalink
Merge pull request #45 from AlwinEsch/Nexus-changes
Browse files Browse the repository at this point in the history
[Nexus] API related update
  • Loading branch information
AlwinEsch authored Sep 16, 2022
2 parents 85e0f84 + 5605619 commit 60d1ea7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void CVisualizationMatrix::Render()
}
}

bool CVisualizationMatrix::Start(int iChannels, int iSamplesPerSec, int iBitsPerSample, std::string szSongName)
bool CVisualizationMatrix::Start(int iChannels, int iSamplesPerSec, int iBitsPerSample, const std::string& szSongName)
{
kodi::Log(ADDON_LOG_DEBUG, "Start %i %i %i %s\n", iChannels, iSamplesPerSec, iBitsPerSample, szSongName.c_str());

Expand Down Expand Up @@ -229,7 +229,7 @@ void CVisualizationMatrix::Stop()
}


void CVisualizationMatrix::AudioData(const float* pAudioData, int iAudioDataLength, float* pFreqData, int iFreqDataLength)
void CVisualizationMatrix::AudioData(const float* pAudioData, size_t iAudioDataLength)
{
WriteToBuffer(pAudioData, iAudioDataLength, 2);

Expand Down Expand Up @@ -332,7 +332,7 @@ bool CVisualizationMatrix::UpdateAlbumart()
return CVisualizationMatrix::UpdateAlbumart(m_albumArt);
}

bool CVisualizationMatrix::UpdateAlbumart(std::string albumart)
bool CVisualizationMatrix::UpdateAlbumart(const std::string& albumart)
{
m_albumArt = albumart;

Expand Down
6 changes: 3 additions & 3 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ class ATTR_DLL_LOCAL CVisualizationMatrix
CVisualizationMatrix();
~CVisualizationMatrix() override;

bool Start(int channels, int samplesPerSec, int bitsPerSample, std::string songName) override;
bool Start(int channels, int samplesPerSec, int bitsPerSample, const std::string& songName) override;
void Stop() override;
void AudioData(const float* audioData, int audioDataLength, float* freqData, int freqDataLength) override;
void AudioData(const float* audioData, size_t audioDataLength) override;
void Render() override;
bool GetPresets(std::vector<std::string>& presets) override;
int GetActivePreset() override;
bool PrevPreset() override;
bool NextPreset() override;
bool LoadPreset(int select) override;
bool RandomPreset() override;
bool UpdateAlbumart(std::string albumart) override;
bool UpdateAlbumart(const std::string& albumart) override;

private:
void RenderTo(GLuint shader, GLuint effect_fb);
Expand Down
2 changes: 1 addition & 1 deletion visualization.matrix/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="visualization.matrix"
version="20.1.0"
version="20.2.0"
name="Matrix"
provider-name="Sarbes">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions visualization.matrix/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
20.2.0
- Kodi visualization API update to version 4.0.0

20.1.0
- Translation updates by Weblate
- Kodi main API update to version 2.0.0
Expand Down

0 comments on commit 60d1ea7

Please sign in to comment.