_Bnu | Jesus christ. Okay, now it's playing something, finally. | 00:04 |
---|---|---|
_Bnu | Because of course you have to put char pcm_device[255] = "plughw:1,0"; | 00:04 |
_Bnu | What sense it makes. | 00:04 |
_Bnu | STM32, I say. | 00:04 |
mntmn | nice | 00:05 |
mntmn | how is the stereo | 00:05 |
_Bnu | Great, I can hear this brain-destroying noise on both channels. | 00:07 |
_Bnu | https://cdn.discordapp.com/attachments/832885633189543946/878763558580682802/2021-08-22_00-11-26.mp4 | 00:12 |
apolkosnik[m] | It's either endian issue or signed/unsigned mismatch | 00:20 |
_Bnu | It's definitely neither of those. | 00:20 |
apolkosnik[m] | Both? | 00:21 |
_Bnu | No, neither one. | 00:21 |
mntmn | it's just stuttering | 00:21 |
_Bnu | If it were wrong endian, it'd just sound like horrible farts. | 00:21 |
mntmn | wrong endianness sounds like white noise, and signed/unsigned sounds like distortion. but this sounds ok but it's just stuttering | 00:21 |
mntmn | i.e. wrong timing, buffer too smolls or not enough cpu time | 00:22 |
apolkosnik[m] | Omg, then it needs 20 more MIPS | 00:22 |
_Bnu | But yeah, I've got sound on both channels with Stereo, left channel only with mono unless I downmix. | 00:24 |
mntmn | did you change the prefsfile or nah? | 00:25 |
_Bnu | So probably the HIFI thing messing around with you, filling every other 16 bits with zeroes. | 00:25 |
_Bnu | I changed the prefsfile. | 00:25 |
mntmn | ok nice that gives me hope | 00:25 |
mntmn | i'll test it tomorrow | 00:25 |
mntmn | btw at 48khz i had luck with buffer size of 3840 | 00:25 |
mntmn | (ahi really likes that size) | 00:26 |
mntmn | idk at 44.1khz | 00:26 |
mntmn | and i run i think 8 periods of 3840 bytes on the zz9000 | 00:26 |
mntmn | a ring buffer of 8 periods | 00:26 |
_Bnu | I still have some issues with ALSA, because it's really bad at explaining how it works. | 00:26 |
mntmn | and for every period i fire the interrupt when it's streamed out | 00:26 |
mntmn | yeah if you don't wanna use alsa directly you could also use sdl2 mixer, openal or something like that | 00:27 |
_Bnu | Like 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 |
mntmn | mhm | 00:28 |
_Bnu | I 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 |
_Bnu | Where I found this one thing that I hadn't already tried. | 00:29 |
mntmn | hm "hw accesses the hardware device directly." "plughw inserts sample rate and format conversion plugins, if needed." | 00:29 |
_Bnu | Neither "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 |
_Bnu | Like, "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 |
mntmn | alsa is very strange yes. | 00:32 |
mntmn | the 3.5mm jack has to be activated in that weird pi config txt file thingie IIRC | 00:32 |
_Bnu | But 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 |
mntmn | unhappy sound format | 00:33 |
mntmn | USF | 00:33 |
_Bnu | Of course, I could just flip them around myself. | 00:35 |
_Bnu | Only takes one cycle per word. | 00:35 |
_Bnu | One 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_ -> TuKo | 09: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 | |
_Bnu | https://cdn.discordapp.com/attachments/832885633189543946/878990135608373268/2021-08-22_15-11-18.mp4 It maybe sounds slightly better now... | 15:13 |
_Bnu | https://cdn.discordapp.com/attachments/832885633189543946/878992816519409684/2021-08-22_15-21-47.mp4 11KHz Myusik. | 15:24 |
mntmn | ha, i'm back in the amiga lab | 15:33 |
mntmn | i will try de-hifi-ification | 15:33 |
mntmn | _Bnu: there's music in your video, nice | 15:33 |
mntmn | ye olde hippoplayer | 15:34 |
mntmn | wtf is > AHIDB_MultTable | 15:37 |
mntmn | _Bnu: did you set AHIDB_Panning ? | 15:38 |
mntmn | i wonder what that's good for, esp with stereo | 15:38 |
mntmn | why 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 |
mntmn | gdonner: thanks for typo! | 15:59 |
gdonner | @mntmn: That's it :) Just thought I'd mention them before I forget | 15:59 |
mntmn | gdonner: it is not possible to update the firmware from the amiga side. | 15:59 |
gdonner | ah, ok | 15:59 |
mntmn | thanks for all typos and the 2.x hint | 15:59 |
gdonner | no problem! | 15:59 |
gdonner | thanks for all your hard work with the 2.0 f/w update and the cool new ZZ9000AX! | 16:00 |
mntmn | you're welcome, still working hard on the software side of AX. | 16:01 |
gdonner | :thumbs up: | 16:02 |
_Bnu | AHIDB_Panning? | 16:02 |
_Bnu | I have no idea what any AHI things like MultTable or Panning are, no. | 16:02 |
mntmn | ok | 16:02 |
_Bnu | I'm not really doing anything special... just feeding the buffered samples from the mixer to ALSA. | 16:04 |
_Bnu | Since 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 mono | 16:21 |
mntmn | also hippoplayer just keeps playing when i press pause... | 16:23 |
mntmn | also hippoplayer is very crashy for me. | 16:27 |
mntmn | maybe my driver makes some corruptiones | 16:27 |
mntmn | AudioCtrl->ahiac_Channels is 4 | 16:56 |
mntmn | omg | 17:00 |
mntmn | maybe it's because i set maxchannels to 2 | 17:00 |
mntmn | and the programs actually use AHI to mix their 4 PT channels?? | 17:00 |
_Bnu | Hm. | 17:06 |
_Bnu | The channels thing should be ignored unless you're doing the mixing yourself. | 17:06 |
_Bnu | But check the MixFreq. | 17:06 |
_Bnu | Ie, 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 |
_Bnu | If the MixFreq is different than your playback frequency, you have to resample it. | 17:07 |
mntmn | i support only 1 frequency. | 17:08 |
mntmn | the frequency is not the problem. half of the samples are just 0. | 17:08 |
mntmn | except if with hippoplayer i set stereo slider to 0%, then both samples (l+r) contain the same value | 17:09 |
mntmn | it is like half of the source material is discarded, i.e. ahi discarding it while mixing | 17:09 |
_Bnu | Yeah, but the MixFreq changes. That's why BuffSamples is different for various mods. | 17:10 |
_Bnu | It's stupid, and the AHI docs do a very poor job of explaining it. | 17:10 |
mntmn | i always get the same BuffSamples | 17:10 |
mntmn | always 3840 | 17:11 |
_Bnu | Weird. | 17:11 |
mntmn | that's what i return for AHIDB_MaxPlaySamples | 17:11 |
mntmn | also, there are no gaps or stuttering for me | 17:12 |
mntmn | like, the half of the music that i get sounds fine | 17:12 |
_Bnu | I return 0xFFFF for that, not sure if that's some special value. | 17:12 |
mntmn | but it's only half | 17:12 |
_Bnu | Also, 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 |
mntmn | yes | 17:17 |
mntmn | uint32_t bytes = 2*AudioCtrl->ahiac_BuffSamples*(AudioCtrl->ahiac_Flags & AHIACF_STEREO ? 2 : 1); | 17:18 |
mntmn | also, the stereo samples are interleaved, right | 17:18 |
mntmn | like 16bits left, 16bits right, 16bits left, 16bits right | 17:18 |
mntmn | so even if the buffer was too short there would still be stereo data in there. | 17:18 |
mntmn | hmm | 17:21 |
mntmn | AHIDB_Stereo (ULONG *) - TRUE if output is in stereo. Unless | 17:21 |
mntmn | AHIDB_Panning (see below) is TRUE, all even channels are played | 17:21 |
mntmn | to the left and all odd to the right. | 17:21 |
mntmn | > Unless AHIDB_Panning is TRUE | 17:21 |
_Bnu | Why are you setting AHIDB_Panning to true... | 17:27 |
mntmn | i did not | 17:29 |
mntmn | next question, what the hell are AHISB / where are they _set_ | 17:29 |
mntmn | maybe it's a typo in the doc | 17:30 |
mntmn | first it says you should return AHISF_MIXING and so on, but then it goes on to talk about AHISB_MIXING and other AHISB_ stuff | 17:30 |
- gdonner (QUIT: ) (~gdonner@c-98-253-93-116.hsd1.in.comcast.net) | 17:33 | |
mntmn | the filesave and toccata drivers don't respond at all to AHIDB_MaxChannels | 17:34 |
mntmn | in getattr | 17:34 |
_Bnu | Froge. | 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 | |
_Bnu | Ah 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 |
_Bnu | For the unit, I guess. | 18:14 |
_Bnu | I hate the music unit. | 18:14 |
_Bnu | Most games just use Unit 0. | 18:14 |
+ S0rin (~S0rin@user/s0rin) | 18:16 | |
mntmn | ok | 18:20 |
mntmn | it sucks. | 18:20 |
mntmn | why do i get all channels with v6. | 18:46 |
mntmn | why don't i get them with v4. | 18:46 |
mntmn | funfact: ahi is really only one file | 18:49 |
mntmn | which is devs:ahi.device | 18:49 |
mntmn | addaudiomodes is unnecessary | 18:49 |
mntmn | devs:dosdrivers/audio also unnecessary | 18:49 |
mntmn | also, the prefs of v6 work with the device v4, so you can play the test sound | 18:49 |
mntmn | and the test sound has the same problem with v4 for me in that it is only on 1 channel. | 18:50 |
mntmn | the number of channels setting makes the test sound quieter, the more channels there are selected. | 18:51 |
_Bnu | ('A`) | 18:51 |
mntmn | so their mixing is really very simple | 18:51 |
_Bnu | Yeah, not sure. I'm just feeding the buffsamples to the ALSA buffer. | 18:51 |
mntmn | yes, i'm also doing that. | 18:51 |
mntmn | except not alsa. | 18:51 |
mntmn | but i also see the samples on the screen. | 18:51 |
_Bnu | uint32_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 |
_Bnu | memcpy(shitbuf + sndbuf_offset, bufptr, bsize); | 18:52 |
_Bnu | Shitbuf. | 18:52 |
mntmn | yeah all of that doesn't matter | 18:52 |
mntmn | it's ahi mixfunc that already fills the buffer with crap in my case | 18:52 |
mntmn | something tells it to make crap | 18:53 |
mntmn | instead of make the right thing | 18:53 |
mntmn | some switch somewhere | 18:53 |
_Bnu | Mmh, yeah, but I'm also using AHI mixing and timing, so I'm not sure what it could be. | 18:53 |
mntmn | you are using 4.18 yeah? | 18:53 |
_Bnu | I've never had AHI 6 installed, though. | 18:53 |
_Bnu | I mean I had it once on my A4000 and it worked like crap. | 18:53 |
mntmn | i wonder if ahi 2 is around somewhere... | 18:53 |
_Bnu | But neve on this particular PiStorm HDD image. | 18:53 |
mntmn | you know what cyberpunk 2077 is missing? dungeons. | 19:00 |
mntmn | i just realized it | 19:00 |
mntmn | naja, more audio shit... | 19:01 |
mntmn | i will generate a prefsfile with all permutations of settings and see how they behave differently... | 19:04 |
mntmn | also weird that the prefsfile tags and the getattr tags are the same... | 19:12 |
mntmn | i mean, they cover the same ground, or overlap | 19:12 |
mntmn | hey ahi is open source https://aminet.net/package/driver/audio/ahisrc | 19:25 |
mntmn | why didn't i find this earlier | 19:26 |
mntmn | why am i not just reading the source | 19:26 |
_Bnu | Because it's AHI 6.0, probably... | 19:27 |
mntmn | yes, but whatever | 19:29 |
mntmn | it has some internal ifdefs for mixer backend, which could be extended... | 19:30 |
mntmn | (they have one for warpup) | 19:31 |
mntmn | wow wow wow | 19:34 |
mntmn | / This old code is totally fucked up ... Why didn't anybody | 19:34 |
mntmn | / complain?! | 19:34 |
mntmn | / cd->cd_StartPointL = cd->cd_TempStartPointL; | 19:34 |
mntmn | / cd->cd_StartPointR = cd->cd_TempStartPointR; | 19:34 |
mntmn | lol the comments | 19:34 |
mntmn | this is from mixer.c | 19:34 |
_Bnu | I 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 |
_Bnu | But otherwise it's way too slow, you'd only be able to use it to play music. | 19:38 |
mntmn | i wonder why it is slow because the mixer thing looks mega simple... maybe it was built without optimization or something | 19:41 |
mntmn | anyway, it's not really helping me unfortunately because ahi6 is doing the expected thing. just unusably slow. | 19:44 |
_Bnu | I'm not sure why it's working on the PiStorm but not on the ZZ9000... | 19:47 |
_Bnu | I mean, "working", there's still a bunch of stuff I don't handle. | 19:48 |
_Bnu | Mostly related to the stupid music unit, which I hate. | 19:48 |
mntmn | yeah so the music unit means that the programs can set those parameters directly and select their audio mode themselves, yeah | 19:55 |
mntmn | ? | 19:55 |
mntmn | also, eagleplayer cannot handle my audiomodes for some reason. | 19:56 |
mntmn | like, i can select them but it doesn't want to play anything with them. | 19:56 |
mntmn | gonna try https://aminet.net/package/mus/play/TKPlayer | 20:08 |
mntmn | cool, that freezes the computer | 20:09 |
- S0rin (QUIT: Ping timeout: 248 seconds) (~S0rin@user/s0rin) | 20:18 | |
+ S0rin (~S0rin@user/s0rin) | 20:20 | |
mntmn | http://www.lysator.liu.se/(dl)/ahi/v4-site/files/ahi/beta/Obsolete/src/ | 20:27 |
mntmn | useless, 5.4 is already slow. | 20:32 |
mntmn | now 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 | |
_Bnu | Apf. | 21:17 |
_Bnu | Apfel. | 21:17 |
mntmn | :(\ | 21:26 |
mntmn | idk how i broke it so that it crashes now and also the buffer size changed into something weird... | 21:26 |
mntmn | everything smells like register clobbering | 21:32 |
mntmn | now it doesn't crash anymore | 21:35 |
neoman | oh right you have to code AHI drivers. good luck! =p | 22:26 |
mntmn | yeah. | 22:27 |
mntmn | the v6 sources have the private data structures at lesat | 22:37 |
mntmn | least | 22:37 |
neoman | mntmn: how was reading "klassik verstehen" ? | 22:38 |
mntmn | neoman: still reading it | 22:53 |
mntmn | but at the moment little time because i have to deal with this AHI mess | 22:53 |
neoman | I also ordered it - let's see :) | 23:10 |
neoman | could Tonis UAESND AHI driver he committed yesterday, help you: https://github.com/tonioni/WinUAE/commit/c417cd0964521347c0d9bcabcad38430fa8b29eb ? | 23:28 |
mntmn | interesting. assembler, though | 23:30 |
mntmn | something is just terribly broken in my ahi 4.18 | 23:32 |
mntmn | i am kind of out of ideas what it is | 23:32 |
mntmn | except that maybe gcc makes code that is not fully compatible with it | 23:32 |
mntmn | like, the mixer mixes only half of the channels. doesn't matter what the output is. i tried all kind of permutations | 23:33 |
mntmn | also not a good sign that most programs opening/closing ahi crash after a few times | 23:52 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!