English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 16 February 2024, 18:12   #1
Emufr3ak
Registered User
 
Join Date: Mar 2016
Location: Thun / Switzerland
Posts: 57
Crackling Noise starting Audio with theplayer routine

Hi Fellow Amiga Coders


I'm at Mountainbytes a Demo Party in Switzerland trying to finish my Demo. I do have an issue with my Sound. It works just fine on the emulator. However on real hardware "A1200 Vanilla" I do have a crackling noise when Sound is starting. This only happens on a cold start. Not after a reboot.



I'm using theplayer routine. Also tried lightspeed player but I'm having even more issues here and I don't want to get into this right now.



Any Ideas how to fix this?


Many Thanks
Emufr3ak is offline  
Old 16 February 2024, 19:38   #2
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,146
Ask the organizers to reboot machine before running your demo, and fix it after the party. (seriously)

Hard to know exactly what problem is without more info, but I'd look for the usual culprits: uninitialized variables, sections in fast that should be in chip, loop points cleared in samples (don't know if that's a thing for the player), etc..
paraj is offline  
Old 16 February 2024, 20:17   #3
Emufr3ak
Registered User
 
Join Date: Mar 2016
Location: Thun / Switzerland
Posts: 57
Thanks paraj. I think I get away with it after all. On the target platform A500 I don't have the issue. Still want to fix it. But this can wait till after the party.
Emufr3ak is offline  
Old 16 February 2024, 20:28   #4
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,146
Party version only needs to work on one machine at exactly right time
Good luck with the compo. I'm sure you'll spot the mistake two weeks after the party.
paraj is offline  
Old 16 February 2024, 20:44   #5
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,006
In startup code start to play empty/null 2 bytes sample stored in chip ram at all channels. Set correct sample address, sample length, volume and set period to 128.
Don_Adan is offline  
Old 16 February 2024, 21:01   #6
Emufr3ak
Registered User
 
Join Date: Mar 2016
Location: Thun / Switzerland
Posts: 57
This sounds very specific. You don't happen to have an example :-)
Emufr3ak is offline  
Old 16 February 2024, 23:45   #7
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,006
Something like this, if my memory not failed.

Code:
 lea Empty, a0
 lea $dff000,a6
 move.l a0,$a0(a6)
 move.l a0,$b0(a6)
 move.l a0,$c0(a6)
 move.l a0,$d0(a6)
 moveq #1,d0
 move.w d0,$a4(a6)
 move.w d0,$b4(a6)
 move.w d0,$c4(a6)
 move.w d0,$d4(a6) 
 moveq #127,d0
 move.w d0,$a6(a6)
 move.w d0,$b6(a6)
 move.w d0,$c6(a6)
 move.w d0,$d6(a6) 
 moveq #64,d0
 move.w d0,$a8(a6)
 move.w d0,$b8(a6)
 move.w d0,$c8(a6)
 move.w d0,$d8(a6) 
 move.w #$800F,$96(a6)
 rts

 Section Null, BSS_C
Empty
 ds.b 2
Don_Adan is offline  
Old 22 February 2024, 09:44   #8
Emufr3ak
Registered User
 
Join Date: Mar 2016
Location: Thun / Switzerland
Posts: 57
Thanks. A reintegration from source solved the problem with the crackling sound. On A1200 the Sound is off a bit now however. I'm using CIA Interrupts with theplayer
Emufr3ak is offline  
Old 22 February 2024, 10:14   #9
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,043
"theplayer"? Do you mean P61?
If so, did you trying increasing the timer value for DMA-on interrupt? Look for "P61_dmason" around line 1700 and then for values hi=$01/lo=$f0 (written to CIA $600/700 or a system structure, don't know whether you're using a system friendly or hardware banging config; there are multiple instances because of lots of nested ifdef's so make sure you change the right one), and increase them.
Maybe you need a longer delay before turning on the audio DMA since it's known that some A1200s have a problem with lower values.
a/b is offline  
Old 22 February 2024, 14:08   #10
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,006
Quote:
Originally Posted by Emufr3ak View Post
Thanks. A reintegration from source solved the problem with the crackling sound. On A1200 the Sound is off a bit now however. I'm using CIA Interrupts with theplayer
Sound can not be off, if you call this routine from right place. Must be called before ThePlayer init routine is called. Anyway it seems that ThePlayer init routine is buggy or you made any fault when calling ThePlayer routines.
Don_Adan is offline  
Old 25 February 2024, 17:52   #11
Emufr3ak
Registered User
 
Join Date: Mar 2016
Location: Thun / Switzerland
Posts: 57
Just listened to it again. This time all sounded well. First part of the song is a bit otherworldly so it might have been that and some soundsettings on my amiga or pc. By the way i'm talking about this demo :-) https://www.pouet.net/prod.php?which=96200. Thanks for your help to all of you
Emufr3ak is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Audible "digital" noise from A1200 audio output 8bitbubsy support.Hardware 23 22 August 2020 12:31
Video and Audio Noise in Amiga 600 Rev 1.5 Nibbler support.Hardware 10 09 March 2020 13:01
HippoPlayer: Strange noise/crackling sound desm0 support.Apps 6 06 February 2020 14:10
Audio stuttering/jittering/distortion/crackling neoman Coders. Asm / Hardware 1 30 May 2016 14:40
A1200 - Audio noise NovaCoder support.Hardware 6 11 March 2012 23:57

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:24.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08841 seconds with 13 queries