  class TestSound : public Sound {
  public:
    TestSound() : Sound() {
      for (auto i = sounds.constBegin(); i != sounds.constEnd(); ++i) {
        QObject::connect(i.value().first, &QSoundEffect::playingChanged, [=, s = i.value().first, a = i.key()]() {
          if (s->isPlaying()) {
            sound_stats[a].first++;
          } else {
            sound_stats[a].second++;
          }
 
</s> remove   PubMaster pm({"controlsState"});
 </s> add   PubMaster pm({"controlsState", "deviceState"});
  MessageBuilder deviceStateMsg;
  auto deviceState = deviceStateMsg.initEvent().initDeviceState();
  deviceState.setStarted(true);

      sound_stats[i.key()] = {0, 0};
  class TestSound : public Sound {
  public:
    TestSound() : Sound() {
      for (auto i = sounds.constBegin(); i != sounds.constEnd(); ++i) {
      sound_stats[i.key()] = {0, 0};
        QObject::connect(i.value().first, &QSoundEffect::playingChanged, [=, s = i.value().first, a = i.key()]() {
          if (s->isPlaying()) {
            sound_stats[a].first++;
          } else {
            sound_stats[a].second++;
          }
keep keep keep add keep keep keep keep keep keep
 soundd: fix test case (#23075)

* init sound_stats

* send deviceState msg 
selfdrive/ui/tests/test_sound.cc