WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. Sound.cpp
Mission NodeSDK 6.1C++sound.cpp

Sound.cpp

SDK Source File: Sound.cpp

Source / SDK 6.1 / C++ / Core

Sound.cpp

Sound.cpp
CPP
1/* Copyright Statement:
2 *
3 * (C) 2021-2024 Cubios Inc. All rights reserved.
4 */
5
6#include "Sound.h"
7
8namespace Cubios
9{
10 Sound::Sound(const std::string& name)
11 {
12 id = SND_getAssetId(name.c_str());
13 }
14
15 Sound::~Sound() { }
16
17 void Sound::Play(uint8_t volume)
18 {
19 SND_play(id, volume);
20 }
21
22 void Sound::Stop()
23 {
24 SND_stop();
25 }
26
27 bool Sound::IsPlaying()
28 {
29 return SND_isPlaying();
30 }
31} // namespace Cubios
32
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

AppManager.cpp
Source / SDK 6.1 / C++ / Core
AppManager.h
Source / SDK 6.1 / C++ / Core
Gfx.h
Source / SDK 6.1 / C++ / Core
native access.h
Source / SDK 6.1 / C++ / Core
Previous Node
Screen.h
Source / SDK 6.1 / C++ / Core
Next Node
Sound.h
Source / SDK 6.1 / C++ / Core