pouët.net

Random line of code thread

category: code [glöplog]
while ($drow = $stmt->fetch(PDO::FETCH_ASSOC)) {
if ($drow["title"]) {
$musicURL = ReturnMusicURL($drow["Path"]);
$lengthinseconds = ($drow["CueOut"] - $drow["CueIn"]);
$response .= "{\"ID\":" . $drow["id"] . ",";
$response .= "\"StationID\":" . $StationID . ",";
$response .= "\"StationName\":\"" . $StationName . "\",";
$response .= "\"Title\":\"" . superentities($drow["title"]) . "\",";
$response .= "\"Fullartist\":\"" . superentities($drow["fullartist"]) . "\",";
$response .= "\"Album\":\"" . superentities($drow["Album"]) . "\",";
$response .= "\"Image\":\"" . ReturnImageType($drow["Album"]) . "\",";

(...)
added on the 2026-06-21 00:07:20 by stripecat stripecat
random wav lib i made for a os
Code:#include "wav.h" #include "../string.h" // for memcmp, memcpy static uint32_t rd32(const uint8_t* p) { return (uint32_t)p[0] | ((uint32_t)p[1] << 8) | ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24); } static uint16_t rd16(const uint8_t* p) { return (uint16_t)p[0] | ((uint16_t)p[1] << 8); } int wav_parse(wav_t* out, const uint8_t* buf, size_t size) { if (size < 44) return 0; // RIFF + WAVE if (memcmp(buf, "RIFF", 4) != 0) return 0; if (memcmp(buf + 8, "WAVE", 4) != 0) return 0; size_t pos = 12; while (pos + 8 <= size) { const uint8_t* chunk = buf + pos; uint32_t chunk_size = rd32(chunk + 4); if (memcmp(chunk, "fmt ", 4) == 0) { out->audio_format = rd16(chunk + 8); out->channels = rd16(chunk + 10); out->sample_rate = rd32(chunk + 12); out->byte_rate = rd32(chunk + 16); out->block_align = rd16(chunk + 20); out->bits_per_sample= rd16(chunk + 22); } if (memcmp(chunk, "data", 4) == 0) { out->data = chunk + 8; out->data_size = chunk_size; return 1; // success } pos += 8 + chunk_size; } return 0; }
added on the 2026-06-21 03:16:52 by hlder hlder
im so programmer
Code:const wtf = Math.floor(Math.random() * idk.length); document.getElementById("funni").innerHTML = idk[wtf];
added on the 2026-06-21 23:53:41 by juanp32 juanp32
LDA #$01
STA $D020
added on the 2026-06-25 11:53:16 by J-san J-san
Code:move.w #TIMEOUT*54,$05e(a6)
added on the 2026-06-27 19:29:14 by Blueberry Blueberry
buf1 = buf1 (+(-buf1 * cut)) + buf1);
buf2 = buf2 (+(-buf2 * (cut / 1.3))) + buf2);
buf3 = buf3 (+(-buf3 * ((cut / 1.3))/1.3)) + buf3);

Got Dam. Is this a "samplerateless" constant-q filter you think? (9db Phase, 18dB filler, via impulseresponse alignment)
added on the 2026-06-27 20:34:25 by J-san J-san
dont ask
Code:printf("aaaaaaaaaaaaaaaaaaa");
added on the 2026-06-30 19:03:20 by juanp32 juanp32

login