close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#212 closed bug (fixed)

After a soundtest YAM can't quit.

Reported by: opiopi Owned by:
Priority: normal Milestone: YAM 2.7
Component: user interface Version: nightly build
Severity: major Keywords:
Cc: OS Platform:
Blocked By: Blocking:
Release Notes:

Description

After doing a soundtest in YAMs config YAM can't quit.

Step by step to reproduce:

  1. Run YAM.
  2. go to Config->Neue Post.
  3. Enable the checkbox 'Ton'.
  4. Select a valid soundfile.
  5. Click the soundtest arrow on the right side some times very fast.
  6. Quit YAM.
  7. You sould get a requester like the attached one (YAM_Warning.png).

Note: I think it only happen if you click very fast while the first
(or second) sound file is still playing. Maybe you must try to click
3 or 4 times very fast. I don't test it deeper. Clicking so much is
not usual but Yam sould handle that without such warning.

A possible solution for that is to disable the button after the
first click.

BTW: Maybe it's not a fault of YAM but here the first sound file is
playing only on left channel and the second (while the first is still
playing) is on the right channel. That was (is) also the cause because
i play the sound with play16.

Used Version: YAM 2.7-dev [OS3/m68k] (15.09.2010)

Attachments (1)

YAM_Warning.png (3.9 KB) - added by opiopi 4 years ago.
The YAM Warning Requester

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by opiopi

The YAM Warning Requester

comment:1 Changed 4 years ago by opiopi

I forget to mention:
Also after 20 minutes waiting and click 'Nochmals versuchen'
i can't quit YAM.

Maybe disabling the button is not the solution?
What happen if a user configure YAM like it play a sound for every
filter action? Then it may be possible that YAM also try to play
some sounds at the same time. but i don't (yet) test it.

comment:2 Changed 4 years ago by tboeckel

  • Resolution set to fixed
  • Status changed from new to closed

(In [5215]) * Threads.c, YAM_UT.c: each thread now allocates a signal which can be used

by the main thread to abort the thread's current action. This closes #212.

comment:3 Changed 4 years ago by tboeckel

I must add that disabling the play button is not possible, because it would not be enabled afterwards as the playback might take an arbitrary long time and the main thread cannot get any specific feedback when the playback has finished.

Additionally, and that's even worse, there are many 3rd party implementations of sound.datatype and each of them handles the playback in a different way. Some use a per object playback task, some others seem to use one global task only. The latter is not able to signal the finished playback if a second sample is to be played in the meantime. Although the playback finishes correctly that initiating task is not woken up. This is now worked around by the abort signal, but the truth is that this sound.datatype is simply broken and there is no way for YAM to tell working and broken versions apart.

I did not yet check how all this works with OS4, but I know that OS4's sound.datatype definitely uses a per object playback task and hence should not suffer from this issue.

comment:4 Changed 4 years ago by tboeckel

I just verified that playing a sample multiple times in parallel is absolutely no problem on AmigaOS4. So this is a bug of the specific sound.datatype used on AmigaOS3.

You might want to try this one http://aminet.net/util/dtype/soundDT41.lha

According to the source it uses one playback task per object and hence there should be no interference. I will try tomorrow on my OS3/WinUAE setup.

I also had some thoughts about disabling the play button. This would only work for synchronous playback. I'll see what I can do about that. But asynchronous playback in a thread is something I won't drop again. Playing a sound after receiving some mails should not halt any other action. That's why the threads are necessary.

comment:5 follow-up: Changed 4 years ago by opiopi

Playing a sample multiple times in parallel is here also no problem.
But as i said before with YAM it plays only on the left channel if
i get mails.

If the left channel is still playing and i click the test button
again the second sound (the same sound) is on the right channel.
If i click very fast the 3th, 4th (and so on) is also playing.
Some left and some right...

I don't know if it's YAMs fault to play the sound only on the left
channel. All i know is with play16 the same sound is playing on
booth channels.

I just try your suggested Datatype and with them i can play only one
sound and must wait before the second sound start playing. Here the
sound is only on the left channel too.

So i switch back to my old (new) sound.Datatype. The Version i use is:
sound.datatype 44.25 (18.10.2001) i think it's the version from
AOS 3.9 or any BB...

comment:6 in reply to: ↑ 5 Changed 4 years ago by tboeckel

Replying to opiopi:

Playing a sample multiple times in parallel is here also no problem.

Ok, that's good to know.

But as i said before with YAM it plays only on the left channel if
i get mails.
If the left channel is still playing and i click the test button
again the second sound (the same sound) is on the right channel.
If i click very fast the 3th, 4th (and so on) is also playing.
Some left and some right...

It is up to sound.datatype to decide how mono samples will be played. YAM does in no way instruct sound.datatype to use either left or right channels only.

I don't know if it's YAMs fault to play the sound only on the left
channel. All i know is with play16 the same sound is playing on
booth channels.

Maybe Play16 converts mono samples to "pseudo" stereo by playing the same sound on the left and the right channel instead of the first free channel only.

comment:7 Changed 2 years ago by damato

  • Component changed from undefined to user interface

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Frank Weber(Reporter, Participant)