Page MenuHomePhabricator (Chris)

soundfx.cpp
No OneTemporary

Authored By
Unknown
Size
781 B
Referenced Files
None
Subscribers
None

soundfx.cpp

#include "soundfx.h"
SoundFX::SoundFX()
{
if (!soundCollectBuffer.loadFromFile("assets/audio/collect.ogg"))
exit(-1);
if (!soundCardBuffer.loadFromFile("assets/audio/card.ogg"))
exit(-1);
soundCollect.setBuffer(soundCollectBuffer);
soundCollect.setVolume(20);
soundCard.setBuffer(soundCardBuffer);
// soundCollect.setVolume(20);
if (!soundLetsBeginBuffer.loadFromFile("assets/audio/letsbegin.ogg"))
exit(-1);
soundLetsBegin.setBuffer(soundLetsBeginBuffer);
soundLetsBegin.setVolume(20);
}
void SoundFX::playCollect()
{
soundCollect.play();
}
void SoundFX::playCard()
{
soundCard.play();
}
void SoundFX::playLetsBegin()
{
// std::cout << "playing.... begin lets" << std::endl;
soundLetsBegin.play();
}

File Metadata

Mime Type
text/x-c
Expires
Sat, Aug 15, 11:21 PM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
77338
Default Alt Text
soundfx.cpp (781 B)

Event Timeline