2021-08-22.log

_BnuJesus christ. Okay, now it's playing something, finally.00:04
_BnuBecause of course you have to put char pcm_device[255] = "plughw:1,0";00:04
_BnuWhat sense it makes.00:04
_BnuSTM32, I say.00:04
mntmnnice00:05
mntmnhow is the stereo00:05
_BnuGreat, I can hear this brain-destroying noise on both channels.00:07
_Bnuhttps://cdn.discordapp.com/attachments/832885633189543946/878763558580682802/2021-08-22_00-11-26.mp400:12
apolkosnik[m]It's either endian issue or signed/unsigned mismatch00:20
_BnuIt's definitely neither of those.00:20
apolkosnik[m]Both? 00:21
_BnuNo, neither one.00:21
mntmnit's just stuttering00:21
_BnuIf it were wrong endian, it'd just sound like horrible farts.00:21
mntmnwrong endianness sounds like white noise, and signed/unsigned sounds like distortion. but this sounds ok but it's just stuttering00:21
mntmni.e. wrong timing, buffer too smolls or not enough cpu time00:22
apolkosnik[m]Omg, then it needs 20 more MIPS00:22
_BnuBut yeah, I've got sound on both channels with Stereo, left channel only with mono unless I downmix.00:24
mntmndid you change the prefsfile or nah?00:25
_BnuSo probably the HIFI thing messing around with you, filling every other 16 bits with zeroes.00:25
_BnuI changed the prefsfile.00:25
mntmnok nice that gives me hope00:25
mntmni'll test it tomorrow00:25
mntmnbtw at 48khz i had luck with buffer size of 384000:25
mntmn(ahi really likes that size)00:26
mntmnidk at 44.1khz00:26
mntmnand i run i think 8 periods of 3840 bytes on the zz900000:26
mntmna ring buffer of 8 periods00:26
_BnuI still have some issues with ALSA, because it's really bad at explaining how it works.00:26
mntmnand for every period i fire the interrupt when it's streamed out00:26
mntmnyeah if you don't wanna use alsa directly you could also use sdl2 mixer, openal or something like that00:27
_BnuLike how the fuck was I supposed to know that I was supposed to put "plughw:1,0" as the audio device name. It's seriously not listed anywhere.00:27
_Bnu"Just do aplay -l or aplay -L to get a list of device names" THAT I CAN'T USE WHEN INITIALIZING ALSA, THANKS.00:28
mntmnmhm00:28
_BnuI did some random googogogoling and came across this forum thread: https://www.linuxquestions.org/questions/programming-9/c-playing-a-wav-file-with-lib-asound-4175467877/00:29
_BnuWhere I found this one thing that I hadn't already tried.00:29
mntmnhm "hw accesses the hardware device directly." "plughw inserts sample rate and format conversion plugins, if needed."00:29
_BnuNeither "hw" or "plughw" were listed anywhere. Just "default", "sysdefault" and a bunch of other names that did absolutely nothing other than fail to initialize.00:30
_BnuLike, "local" was supposed to be some thing you could use for the 3.5mm jack on the Raspberry Pi, but it doesn't work.00:31
mntmnalsa is very strange yes.00:32
mntmnthe 3.5mm jack has to be activated in that weird pi config txt file thingie IIRC00:32
_BnuBut yeah, plughw is flipping the bytes around for me with plughw, with hw (which I tried earlier), it fails to initialize with unsupported sound format.00:33
mntmnunhappy sound format00:33
mntmnUSF00:33
_BnuOf course, I could just flip them around myself.00:35
_BnuOnly takes one cycle per word.00:35
_BnuOne bicycle.00:51
- RobDangerous (QUIT: Ping timeout: 250 seconds) (~Thunderbi@p200300ec8f3e1c0089d6425751775c57.dip0.t-ipconnect.de)01:50
- my_pc_is_amiga (QUIT: Quit: bye) (~my_pc_is_@c-71-197-66-36.hsd1.ca.comcast.net)03:21
+ RobDangerous (~Thunderbi@p200300ec8f3e1c00e4aec4e4288926cb.dip0.t-ipconnect.de)08:02
* TuKo_ -> TuKo09:14
- RobDangerous (QUIT: Ping timeout: 250 seconds) (~Thunderbi@p200300ec8f3e1c00e4aec4e4288926cb.dip0.t-ipconnect.de)10:34
- xet7 (QUIT: Remote host closed the connection) (~xet7@user/xet7)12:31
+ xet7 (~xet7@user/xet7)12:32
_Bnuhttps://cdn.discordapp.com/attachments/832885633189543946/878990135608373268/2021-08-22_15-11-18.mp4 It maybe sounds slightly better now...15:13
_Bnuhttps://cdn.discordapp.com/attachments/832885633189543946/878992816519409684/2021-08-22_15-21-47.mp4 11KHz Myusik.15:24
mntmnha, i'm back in the amiga lab15:33
mntmni will try de-hifi-ification15:33
mntmn_Bnu: there's music in your video, nice15:33
mntmnye olde hippoplayer15:34
mntmnwtf is > AHIDB_MultTable15:37
mntmn_Bnu: did you set AHIDB_Panning ?15:38
mntmni wonder what that's good for, esp with stereo15:38
mntmnwhy would i have my stereo image de-panned...15:38
+ gdonner (~gdonner@c-98-253-93-116.hsd1.in.comcast.net)15:51
gdonner@mntmn: Just curious: is it theoretically possible to update the ZZ9000 BOOT.BIN file from the Amiga side?15:54
gdonner@mntmn: Just a few typos I spotted in the ZZ9000 R-3 manual: [J6: Audio breaks out the the raw...] (double "the")15:56
gdonner@mntmn: Under "Software Installation": "P96 2.x" should be "3.x" (since AFAIK 2.x is not downloadable from IComp's website)15:57
gdonner@mntmn: Under "Running ARM software and 68000 family" ("family" is misspelled)15:58
mntmngdonner: thanks for typo!15:59
gdonner@mntmn: That's it :) Just thought I'd mention them before I forget15:59
mntmngdonner: it is not possible to update the firmware from the amiga side.15:59
gdonnerah, ok15:59
mntmnthanks for all typos and the 2.x hint15:59
gdonnerno problem!15:59
gdonnerthanks for all your hard work with the 2.0 f/w update and the cool new ZZ9000AX!16:00
mntmnyou're welcome, still working hard on the software side of AX.16:01
gdonner:thumbs up:16:02
_BnuAHIDB_Panning?16:02
_BnuI have no idea what any AHI things like MultTable or Panning are, no.16:02
mntmnok16:02
_BnuI'm not really doing anything special... just feeding the buffered samples from the mixer to ALSA.16:04
_BnuSince I can't get it to stop locking up without the mixing/timing enabled.16:04
- S0rin (QUIT: Ping timeout: 268 seconds) (~S0rin@user/s0rin)16:10
+ S0rin (~S0rin@user/s0rin)16:13
mntmn_Bnu: fuuuuuuuuugg for me it is still goddamn mono16:21
mntmnalso hippoplayer just keeps playing when i press pause...16:23
mntmnalso hippoplayer is very crashy for me.16:27
mntmnmaybe my driver makes some corruptiones16:27
mntmnAudioCtrl->ahiac_Channels is 416:56
mntmnomg17:00
mntmnmaybe it's because i set maxchannels to 217:00
mntmnand the programs actually use AHI to mix their 4 PT channels??17:00
_BnuHm.17:06
_BnuThe channels thing should be ignored unless you're doing the mixing yourself.17:06
_BnuBut check the MixFreq.17:06
_BnuIe, it's always 2 channels if it's stereo and 1 channel if it's mono, if you're using AHI's mixing.17:07
_BnuIf the MixFreq is different than your playback frequency, you have to resample it.17:07
mntmni support only 1 frequency.17:08
mntmnthe frequency is not the problem. half of the samples are just 0.17:08
mntmnexcept if with hippoplayer i set stereo slider to 0%, then both samples (l+r) contain the same value17:09
mntmnit is like half of the source material is discarded, i.e. ahi discarding it while mixing17:09
_BnuYeah, but the MixFreq changes. That's why BuffSamples is different for various mods.17:10
_BnuIt's stupid, and the AHI docs do a very poor job of explaining it.17:10
mntmni always get the same BuffSamples17:10
mntmnalways 384017:11
_BnuWeird.17:11
mntmnthat's what i return for AHIDB_MaxPlaySamples17:11
mntmnalso, there are no gaps or stuttering for me17:12
mntmnlike, the half of the music that i get sounds fine17:12
_BnuI return 0xFFFF for that, not sure if that's some special value.17:12
mntmnbut it's only half17:12
_BnuAlso, buffsamples isn't the total number of samples, it's samples * 2 size for Stereo... but maybe you're already taking that into account.17:15
mntmnyes17:17
mntmnuint32_t bytes = 2*AudioCtrl->ahiac_BuffSamples*(AudioCtrl->ahiac_Flags & AHIACF_STEREO ? 2 : 1);17:18
mntmnalso, the stereo samples are interleaved, right17:18
mntmnlike 16bits left, 16bits right, 16bits left, 16bits right17:18
mntmnso even if the buffer was too short there would still be stereo data in there.17:18
mntmnhmm17:21
mntmn       AHIDB_Stereo (ULONG *) - TRUE if output is in stereo. Unless17:21
mntmn           AHIDB_Panning (see below) is TRUE, all even channels are played17:21
mntmn           to the left and all odd to the right.17:21
mntmn> Unless AHIDB_Panning is TRUE17:21
_BnuWhy are you setting AHIDB_Panning to true...17:27
mntmni did not17:29
mntmnnext question, what the hell are AHISB / where are they _set_17:29
mntmnmaybe it's a typo in the doc17:30
mntmnfirst it says you should return AHISF_MIXING and so on, but then it goes on to talk about AHISB_MIXING and other AHISB_ stuff17:30
- gdonner (QUIT: ) (~gdonner@c-98-253-93-116.hsd1.in.comcast.net)17:33
mntmnthe filesave and toccata drivers don't respond at all to AHIDB_MaxChannels17:34
mntmnin getattr17:34
_BnuFroge.17:47
mntmn_Bnu: can you change the settings of the Music unit? for me they're all disabled except "output". also, what exactly is the music unit vs the other units?17:50
- S0rin (QUIT: Ping timeout: 250 seconds) (~S0rin@user/s0rin)18:12
_BnuAh no, like I said, the music unit is special. You can't change the number of internal sound channels for it, and the MixFreq can be different from the frequency you specified for the mode.18:14
_BnuFor the unit, I guess.18:14
_BnuI hate the music unit.18:14
_BnuMost games just use Unit 0.18:14
+ S0rin (~S0rin@user/s0rin)18:16
mntmnok18:20
mntmnit sucks.18:20
mntmnwhy do i get all channels with v6.18:46
mntmnwhy don't i get them with v4.18:46
mntmnfunfact: ahi is really only one file18:49
mntmnwhich is devs:ahi.device18:49
mntmnaddaudiomodes is unnecessary 18:49
mntmndevs:dosdrivers/audio also unnecessary18:49
mntmnalso, the prefs of v6 work with the device v4, so you can play the test sound18:49
mntmnand the test sound has the same problem with v4 for me in that it is only on 1 channel.18:50
mntmnthe number of channels setting makes the test sound quieter, the more channels there are selected.18:51
_Bnu('A`)18:51
mntmnso their mixing is really very simple18:51
_BnuYeah, not sure. I'm just feeding the buffsamples to the ALSA buffer.18:51
mntmnyes, i'm also doing that.18:51
mntmnexcept not alsa.18:51
mntmnbut i also see the samples on the screen.18:51
_Bnuuint32_t bsize = ahi_u32[0] * get_ahi_sample_size(ahi_u32[3]) * get_ahi_channels(ahi_u32[3]);18:51
_Bnu(Channels just being based on if it's stereo or mono.)18:52
_Bnumemcpy(shitbuf + sndbuf_offset, bufptr, bsize);18:52
_BnuShitbuf.18:52
mntmnyeah all of that doesn't matter18:52
mntmnit's ahi mixfunc that already fills the buffer with crap in my case18:52
mntmnsomething tells it to make crap18:53
mntmninstead of make the right thing18:53
mntmnsome switch somewhere 18:53
_BnuMmh, yeah, but I'm also using AHI mixing and timing, so I'm not sure what it could be.18:53
mntmnyou are using 4.18 yeah?18:53
_BnuI've never had AHI 6 installed, though.18:53
_BnuI mean I had it once on my A4000 and it worked like crap.18:53
mntmni wonder if ahi 2 is around somewhere...18:53
_BnuBut neve on this particular PiStorm HDD image.18:53
mntmnyou know what cyberpunk 2077 is missing? dungeons.19:00
mntmni just realized it19:00
mntmnnaja, more audio shit...19:01
mntmni will generate a prefsfile with all permutations of settings and see how they behave differently...19:04
mntmnalso weird that the prefsfile tags and the getattr tags are the same...19:12
mntmni mean, they cover the same ground, or overlap19:12
mntmnhey ahi is open source https://aminet.net/package/driver/audio/ahisrc19:25
mntmnwhy didn't i find this earlier19:26
mntmnwhy am i not just reading the source19:26
_BnuBecause it's AHI 6.0, probably...19:27
mntmnyes, but whatever19:29
mntmnit has some internal ifdefs for mixer backend, which could be extended...19:30
mntmn(they have one for warpup)19:31
mntmnwow wow wow19:34
mntmn/    This old code is totally fucked up ... Why didn't anybody19:34
mntmn/    complain?!19:34
mntmn/            cd->cd_StartPointL = cd->cd_TempStartPointL;19:34
mntmn/            cd->cd_StartPointR = cd->cd_TempStartPointR;19:34
mntmnlol the comments19:34
mntmnthis is from mixer.c19:34
_BnuI mean uhh. If AHI 6.0 can be made to not do anything but provide samples to mix and play back, it might be usable.19:37
_BnuBut otherwise it's way too slow, you'd only be able to use it to play music.19:38
mntmni wonder why it is slow because the mixer thing looks mega simple... maybe it was built without optimization or something19:41
mntmnanyway, it's not really helping me unfortunately because ahi6 is doing the expected thing. just unusably slow.19:44
_BnuI'm not sure why it's working on the PiStorm but not on the ZZ9000...19:47
_BnuI mean, "working", there's still a bunch of stuff I don't handle.19:48
_BnuMostly related to the stupid music unit, which I hate.19:48
mntmnyeah so the music unit means that the programs can set those parameters directly and select their audio mode themselves, yeah19:55
mntmn?19:55
mntmnalso, eagleplayer cannot handle my audiomodes for some reason.19:56
mntmnlike, i can select them but it doesn't want to play anything with them.19:56
mntmngonna try https://aminet.net/package/mus/play/TKPlayer20:08
mntmncool, that freezes the computer20:09
- S0rin (QUIT: Ping timeout: 248 seconds) (~S0rin@user/s0rin)20:18
+ S0rin (~S0rin@user/s0rin)20:20
mntmnhttp://www.lysator.liu.se/(dl)/ahi/v4-site/files/ahi/beta/Obsolete/src/20:27
mntmnuseless, 5.4 is already slow.20:32
mntmnnow ahi prefs crash when trying the test sound.20:58
- S0rin (QUIT: Ping timeout: 252 seconds) (~S0rin@user/s0rin)21:08
+ S0rin (~S0rin@user/s0rin)21:11
_BnuApf.21:17
_BnuApfel.21:17
mntmn:(\21:26
mntmnidk how i broke it so that it crashes now and also the buffer size changed into something weird...21:26
mntmneverything smells like register clobbering21:32
mntmnnow it doesn't crash anymore21:35
neomanoh right you have to code AHI drivers. good luck! =p22:26
mntmnyeah.22:27
mntmnthe v6 sources have the private data structures at lesat22:37
mntmnleast22:37
neomanmntmn: how was reading "klassik verstehen" ?22:38
mntmnneoman: still reading it22:53
mntmnbut at the moment little time because i have to deal with this AHI mess22:53
neomanI also ordered it - let's see :)23:10
neomancould Tonis UAESND AHI driver he committed yesterday, help you: https://github.com/tonioni/WinUAE/commit/c417cd0964521347c0d9bcabcad38430fa8b29eb ?23:28
mntmninteresting. assembler, though23:30
mntmnsomething is just terribly broken in my ahi 4.1823:32
mntmni am kind of out of ideas what it is23:32
mntmnexcept that maybe gcc makes code that is not fully compatible with it23:32
mntmnlike, the mixer mixes only half of the channels. doesn't matter what the output is. i tried all kind of permutations23:33
mntmnalso not a good sign that most programs opening/closing ahi crash after a few times23:52

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!