Beispiel #1
0
 void stopped()
 {
     beeper_.rest(1);
     progressThread_->stop();
     delete progressThread_;
     progressThread_ = NULL;
     nowPlaying_ = false;
     progressIcon_->reset();
 }
Beispiel #2
0
 void stopPlay()
 {
     if (!nowPlaying_ || NULL == playThread_) return;
     progressThread_->stop();
     playThread_->stop();
     beeper_.rest(1);
     delete progressThread_;
     delete playThread_;
     playThread_ = NULL;
     progressThread_ = NULL;
     nowPlaying_ = false;
     progressIcon_->reset();
 }
Beispiel #3
0
 void play()
 {
     syscall_get_io();
     for (uint32_t i = playIndex_; i < playList_.size(); i++)
     {
         string path = APPLICATION_DATA_DIR"/" + playList_[i];
         scoped_ptr<SharedMemory> shm(monapi_file_read_all(path.c_str()));
         if (NULL == shm.get() || shm->size() == 0) return;
         string mml = string((char*)shm->data(), shm->size());
         statusLabel_->setText(beeper_.title(mml.c_str()).c_str());
         beeper_.play(mml.c_str());
         beeper_.rest(1000);
     }
     playIndex_ = 0;
     playButton_->revert();
 }
Beispiel #4
0
 void play()
 {
     syscall_get_io();
     for (uint32_t i = playIndex_; i < playList_.size(); i++)
     {
         string path = APPLICATION_DATA_DIR"/" + playList_[i];
         monapi_cmemoryinfo* mi = monapi_file_read_all(path.c_str());
         if (NULL == mi || mi->Size == 0) return;
         string mml = string((char*)mi->Data, mi->Size);
         statusLabel_->setText(beeper_.title(mml.c_str()).c_str());
         beeper_.play(mml.c_str());
         beeper_.rest(1000);
     }
     playIndex_ = 0;
     playButton_->revert();
 }