void frmContactEditor::AddSound( wxCommandEvent& event )
{
- int intResult = 0;
-
+ // Bring up a form to add sound.
+
frmContactEditorSound *frameCESound = new frmContactEditorSound ( this );
frameCESound->SetEditorMode(FALSE);
- intResult = GetLastInt(&ContactEditorData.SoundsList);
frameCESound->SetupPointers(&ContactEditorData.SoundsList,
&ContactEditorData.SoundsListAltID,
&ContactEditorData.SoundsListPID,
void frmContactEditor::ModifySound( wxCommandEvent& event )
{
+ // Bring up a form to modify sound.
+
long longSelected = -1;
int intSelectedData = 0;
void frmContactEditor::DeleteSound( wxCommandEvent& event )
{
+ // Bring up a form to delete sound.
+
long longSelected = -1;
int intSelectedData = 0;
void frmContactEditor::PlaySoundDetach()
{
+ // Play the sound and detach.
+
if (!AudioStreamPlayback.openFromMemory(base64dec.c_str(), base64declen)){
// Can't load file. We must flee...
}
btnStop->Enable();
-
- //AudioStreamPlayback.setbuffer(AudioBuffer);
+
AudioStreamPlayback.play();
- /*timespec n1, n2;
-
- n1.tv_sec = 0;
- n1.tv_nsec = 100000000L;*/
-
- //while (TimeA != TimeB){
while (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
// We poll this every 100ms in order to conserve CPU usage.
void frmContactEditor::PlaySound( wxCommandEvent& event )
{
- //sf::Music *AudioPlayback = new sf::Music;
- //AudioStream *AudioStreamPlayback = new AudioStream;
- //sf::SoundBuffer *AudioBuffer = new sf::SoundBuffer;
-
- //sf::Sound *AudioPlayback = new sf::Sound;
-
- //delete(AudioPlayback);
-
- //delete(AudioPlayback);
- //delete(AudioStreamPlayback);
- //delete(AudioBuffer);
-
- //AudioPlayback = NULL;
- //AudioStreamPlayback = NULL;
- //AudioBuffer = NULL;
-
- //return;
+ // Play the sound.
long longSelected = -1;
int intSelectedData = 0;
void frmContactEditor::StopSound( wxCommandEvent& event )
{
+
+ // Stop the sound.
if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
void frmContactEditor::SaveSound( wxCommandEvent &event )
{
+ // Save the sound.
+
long longSelected = -1;
int intSelectedData = 0;