cinera_handmade.network/cmuratori/hero/code/code524.hmml

68 lines
6.5 KiB
Plaintext
Raw Permalink Normal View History

[video output=day524 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Integrating WAV Importing" vod_platform=youtube id=mXqA2U0sa28 annotator=Miblo]
2019-04-08 18:15:06 +00:00
[0:01][Welcome with a plug of Handmade Seattle[ref
site="Handmade Seattle"
url=https://www.handmade-seattle.com/], noting that the HandmadeCon site[ref
site="Handmade Hero"
page="Handmade Hero-related Conferences"
url=https://handmadehero.org/conference] now mentions this conference][:research]
[6:09][Recap and set the stage for the day merging in our WAV processing code][:"asset system" :parsing :speech]
[7:33][Navigate handmade_wav.cpp, eliciting a green flash in ~4coder denoting a render buffer overflow at 7\:43][:admin]
[7:46][Request a note of the green flash from @Miblo][:admin]
[8:44][@Miblo][Q: Gotcha! I'll email you the link to it]
[8:50][Set up to implement ParseWAV()][:"asset system" :parsing :research]
[11:29][Replace the assertions in ParseWAV() with :"error handling"][:"asset system" :parsing]
[20:08][Consider enabling ParseWAV() to support an arbitrary number of audio channels][:"asset system" :research]
[26:55][Consider enabling ParseWAV() to deinterleave audio sources, for mixing down to 8 channels][:"asset system" :parsing :research]
[29:00][Enable ParseWAV() to deinterleave audio sources into separate buffers, introducing GetChannelSamples()][:"asset system" :parsing]
[35:46][Remove the stale code from ParseWAV()][:"asset system" :parsing]
[36:54][Iterating over RIFF chunks][:"asset system" :"file format" :parsing :research]
[38:47][Create handmade_riff.cpp to contain our existing RIFF iteration code[ref
site=Wikipedia
page="Resource Interchange File Format"
url=https://en.wikipedia.org/wiki/Resource_Interchange_File_Format][ref
author="IBM Corporation and Microsoft Corporation"
title="Multimedia Programming Interface and Data Specifications 1.0"
url=http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf]][:"asset system" :"file format" :parsing]
[48:32][Set up ParseWAV() to parse any RIFF file, calling IterateRIFF()][:"asset system" :"file format" :parsing]
[52:36][Introduce IterateRIFF() and GetHeaderChunk()][:"asset system" :"file format" :parsing]
[1:00:32][Fix compile errors in the RIFF :parsing code][:"asset system" :"file format"]
[1:03:22][Set up to import our parsed audio data from .hha files][:"asset system" :research]
[1:05:50][Implement ProcessAudioImport(), streaming in our audio assets in chunks, and introduce UnloadAudio()[ref
site=Wikipedia
page="Dolby Surround 7.1"
url=https://en.wikipedia.org/wiki/Dolby_Surround_7.1]][:"asset system" :memory]
[1:21:16][Enable ProcessAudioImport() to tag audio assets with IDs][:"asset system"]
[1:27:03][Let ProcessAudioImport() instead not tag audio streaming chunks, but only reserve enough contiguously indexed asset chunks for the sample chain][:"asset system" :memory]
[1:36:51][Set up ParseTopLevelBlock() to stamp out the audio channel tags][:"asset system" :parsing]
[1:40:43][Q&A][:speech]
[1:41:09][@jkfsda][Q: Not related, but do you have any thoughts on Pony lang?][:language]
[1:42:00][@flightlesshippo][Q: How are you feeling about the way the :"asset system"'s working out so far?]
[1:43:09][@brimonk][Q: What does good :documentation look like? I think I've heard about you and [@naysayer88 Jon] talk about documentation being really bad and soul sucking when it's auto generated. So, what does "good" human made documentation look like for programmers, and for users?[ref
site="Microsoft Docs"
page="CreateFileA function"
url=https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilea]]
[1:46:35][@brimonk][Q: So like, Unix man pages, because they lean closer to conceptual :documentation (as far as I can tell), would be more preferable to you?]
[1:47:08][@centhusiast][Q: Does the C code run faster, in general, if we replace something like width /=2 and height /=2 by the left bit shift <<1?][:performance]
[1:47:35][@nonsensation][Q: About Meow hash, do you have any resources on how you came up with it or where I could learn more about designing such?][:hashing]
[1:49:02][@ormone88][Q: Do modern game engines have their own sound synthesizer, or do they just import sounds from other software / libraries?[ref
site="RAD Game Tools"
page="The Miles Sound System"
url=http://www.radgametools.com/miles.htm][ref
site=fmod
url=https://www.fmod.com/]][:audio]
[1:52:24][@centhusiast][Q: Could you demonstrate in one episode how you implemented cmirror version control? It seems very interesting. Thanks a lot][:vcs]
[1:55:02][@flightlesshippo][Q: How many times have people given you the old "why reinvent the wheel?" line? I've never seen a discussion about building code from scratch not have at least someone smugly break that one out]
[1:58:36][@ivereadthesequel][Q: Speaking about MSDN, I had an issue where an old version of docs had a remark that was important for a certain call, that some value should be set a certain way in a struct. Not there in the new version. ACKK!! Anyway, doesn't the "remarks" section usually have information on things like "CloseFile" for the "CreateFile" call and so on?][:documentation]
[2:00:27][@jkfsda][Q: Why is Functional Programming not dominating corporate programming? It's much better for business apps][:language]
[2:01:20][@zennmystic][Q: You changed debugger yesterday… To what again?[ref
site=RemedyBG
url=https://remedybg.itch.io/remedybg]]
[2:05:00][@spkmodzzyt][Q: Anyway to get ~4coder for free?]
[2:05:28][@ivereadthesequel][Q: Do you know why functional programming languages tend to be so closely tied to formal verification and more theoretical work, by any chance?][:language]
[2:07:11][@spkmodzzyt][Q: Is it license-based?]
[2:07:35][@Brian][Q: Greetings [@cmuratori Casey]. How do you find balancing duplicating code versus trying to generalize a function? As an exercise, I took FormatString() from [~hero Handmade Hero] and wrote a FormatWideString() version. In the end I chose to simply take the format, call UTF8FromUTF16(), call FormatString() on a temp buffer, then UTF16FromUTF8(). But now I sacrifice :performance for maintenance. Other than if it becomes a bottleneck when profiling, what other things do you look for choosing to duplicate code and making it more a pain to maintain, than the benefits of having specific versions?][:language]
[2:09:24][Wrap it up with a plug of Handmade Seattle[ref
site="Handmade Seattle"
url=https://www.handmade-seattle.com/]][:speech]
[/video]