Exemple #1
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();
 }
Exemple #2
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();
 }