Skip to content

Commit

Permalink
stupid fmod!!
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMario211 committed Aug 6, 2024
1 parent cab60cf commit 212f2cb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## <cj>v1.3.8</c> <cb>(2024-08-06)</c>
* <cy>Fixed</c> crash with Notifications Server conflicting with Mega Hack.

## <cj>v1.3.7</c> <cb>(2024-07-28)</c>
* <cg>Added</c> Notifications SFX settings

Expand Down Expand Up @@ -200,4 +203,4 @@
* <cy>Fixed</c> about.md

## <cj>v1.0.0</c> <cb>(2023-09-23)</c>
* <cp>Geode public release</c>
* <cp>Geode public release</c>
4 changes: 2 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "3.3.1",
"version": "v1.3.7",
"geode": "3.4.0",
"version": "v1.3.8",
"gd": {
"win": "2.206",
"mac": "2.206",
Expand Down
3 changes: 3 additions & 0 deletions src/Secret/BadApple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ class $modify(SecretVault, SecretLayer2) {
}

void launchBadApple(CCObject* pSender) {

//GameSoundManager::sharedManager()->stopBackgroundMusic();
FMODAudioEngine::sharedEngine()->stopAllMusic();
auto scene = cocos2d::CCScene::create();
auto layer = BadApple::create();
scene->addChild(layer);
Expand All @@ -199,6 +201,7 @@ class $modify(SecretVault, SecretLayer2) {

void launchCOTE(CCObject* pSender) {
//GameSoundManager::sharedManager()->stopBackgroundMusic();
FMODAudioEngine::sharedEngine()->stopAllMusic();
auto scene = cocos2d::CCScene::create();
auto layer = COTE::create();
scene->addChild(layer);
Expand Down
6 changes: 2 additions & 4 deletions src/Secret/VideoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// NO MUSIC BECUASE SOMEONE FORGOT TO ADD FMOD FIELDS :(

#include "fmod.h"
#define PL_MPEG_IMPLEMENTATION
#include "VideoPlayer.hpp"
#ifdef GEODE_IS_WINDOWS
Expand Down Expand Up @@ -135,10 +136,7 @@ namespace videoplayer {
m_samples = {};
engine->m_system->createStream(nullptr, FMOD_OPENUSER, &soundInfo, &m_sound);

FMOD::ChannelGroup* group;
engine->m_globalChannel->getChannelGroup(&group);

engine->m_system->playSound(m_sound, group, false, &m_channel);
engine->m_system->playSound(m_sound, engine->m_globalChannel, false, &m_channel);
m_channel->setVolume(m_volume);

m_channel->setUserData(this);
Expand Down

0 comments on commit 212f2cb

Please sign in to comment.