(msg *Message)
| 1223 | } |
| 1224 | |
| 1225 | func (sc *SoundContents) ReceiveMessage(msg *Message) { |
| 1226 | |
| 1227 | if msg.Type == MessageUndoRedo { |
| 1228 | sc.LoadFile() |
| 1229 | } |
| 1230 | |
| 1231 | if sc.Sound != nil { |
| 1232 | |
| 1233 | if msg.Type == MessageCardDeleted || msg.Type == MessageCardDestroyed { |
| 1234 | sc.Sound.Pause() |
| 1235 | // if globals.Settings.Get(SettingsCacheAudioBeforePlayback).AsBool() { |
| 1236 | sc.Sound.Destroy() |
| 1237 | sc.Sound = nil |
| 1238 | // } |
| 1239 | sc.Playing = false |
| 1240 | } |
| 1241 | |
| 1242 | if msg.Type == MessageVolumeChange { |
| 1243 | sc.Sound.UpdateVolume() |
| 1244 | } |
| 1245 | |
| 1246 | } |
| 1247 | |
| 1248 | } |
| 1249 | |
| 1250 | type ImageContents struct { |
| 1251 | DefaultContents |
nothing calls this directly
no test coverage detected