Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Removed unused variables from contacteditor/frmContactEditor-Sound.cpp
[xestiaab/.git] / source / contacteditor / frmContactEditor-Sound.cpp
index 6138d97..ba1a0c9 100644 (file)
 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,
@@ -50,6 +49,8 @@ void frmContactEditor::AddSound( wxCommandEvent& event )
 void frmContactEditor::ModifySound( wxCommandEvent& event )
 {
        
+       // Bring up a form to modify sound.
+       
        long longSelected = -1;
        int intSelectedData = 0;
     
@@ -81,6 +82,8 @@ void frmContactEditor::ModifySound( wxCommandEvent& event )
 void frmContactEditor::DeleteSound( wxCommandEvent& event )
 {
        
+       // Bring up a form to delete sound.
+       
        long longSelected = -1;
        int intSelectedData = 0;
     
@@ -102,6 +105,8 @@ void frmContactEditor::DeleteSound( wxCommandEvent& event )
 void frmContactEditor::PlaySoundDetach()
 {
     
+       // Play the sound and detach.
+       
        if (!AudioStreamPlayback.openFromMemory(base64dec.c_str(), base64declen)){
         
                // Can't load file. We must flee...
@@ -114,16 +119,9 @@ void frmContactEditor::PlaySoundDetach()
        }
     
        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.
@@ -139,23 +137,7 @@ void frmContactEditor::PlaySoundDetach()
 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;
@@ -190,6 +172,8 @@ void frmContactEditor::PlaySound( wxCommandEvent& event )
 
 void frmContactEditor::StopSound( wxCommandEvent& event )
 {
+       
+       // Stop the sound.
     
        if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
         
@@ -206,6 +190,8 @@ void frmContactEditor::StopSound( wxCommandEvent& event )
 void frmContactEditor::SaveSound( wxCommandEvent &event )
 {
 
+       // Save the sound.
+       
        long longSelected = -1;
        int intSelectedData = 0;
     
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy