程序代写 CSC 388/588 (Type in fields) 2 – cscodehelp代写
Real-time Multithreaded Architecture use Adobe Reader to complete Submission Report CSC 388/588 (Type in fields) 2
Student Information
Integrity Policy: All university integrity and class syllabus policies have been followed. I have neither given, nor received, nor have I tolerated others’ use of unauthorized aid.
I understand and followed these policies:
Copyright By cscodehelp代写 加微信 cscodehelp
Name: Date:
Submission Details
Final Changelist number:
Verified build: Yes No
Required Configurations: YouTube Link:
Self Grading Section:
Required Features: Basics
XAudio2 Voices
Attributes (volume, pan, pitch, etc.)
Loading Waves (initiated from game side)
Instancing playing the multiple instances of the same SndCall
Seamless transitions between voices using Voice Callbacks in Playlist Using Voice Buffers or Stitch Voices together
Priorities
Creating a priority table (6 entries)
Preemptively cancelling or calling SndCalls based on their priorities
Using “time playing” for cases where there are multiple calls with same priority Game User Callbacks
On Game Side – user supplied callback for StreamEnd() Callback for the game to trigger an event on playing end
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete Submission Report
CSC 388/588
(Type in fields) File
File load callback when the file is loaded and ready on the Audio Thread
Audio Management Handles
Buffer (wave data)
Voice (management)
Other systems for management
Memory Leaking Verification No Resources Leaking
YouTube Process
• Record the YouTube demo
o Youneedtorecordinstereowithcommentary
2 channel with both computer (desktop) and microphone recording o Suggestion:OBSscreencapture
• Record the desktop (enough to show your directory and the visual studio and output) o Showyourdirectoryinrecording
Launch the visual studio (double click solution) o Showoffrelevantpartsofthecodewithcommentary o LaunchanddemotheMS2
Play the demo and add your commentary in real-time o Watchyourvideo
Verify that video clear and can you hear the commentary audio in stereo?
• Note: Weekly Sprints cannot be longer that 15:00 mins
o Ifyougoover…doitagain
o NEEDTOseecompilingandlightdiscussionofcodewithdemo
• Publish your YouTube recording
o Makesureitisaccessiblewithoutanyloginorpermissiontoplay
o Itcanbeprivatebutnotrestrictivetoplaybyanyonewiththelink
• Submit your code to perforce to the appropriate MS2 directory
o Verifyit
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete CSC 388/588 (Type in fields)
Pdf form (this document)
• Submit this PDF to perforce o Fillinform
Name, changlelist, etc…
YouTube Link
o Submitbacktoperforce
Submission Report Keenan
Verify Builds
Check it out and Submit it back to perforce to the same location
• Follow the Piazza procedure on submission
o Verifyyoursubmissioncompilesandworksatthechangelistnumber.
• Verify that only MINIMUM files are submitted o No–Generatedfiles
*.pdb, *.suo, *.sdf, *.user, *.obj, *.exe, *.log, *.pdb, *.db, *.user
Anything that is generated by the compiler should not be included o No–Generateddirectories
/Debug, /Release, /Log, /ipch, /.vs
• Typical files project files that are required
o *.sln,*.cpp,*.h
o *.vcxproj,*.vcxproj.filters,CleanMe.bat
Standard Rules
Submit multiple times to Perforce
• Submit your work as you go to perforce several times (at least 5) o Assoonasyougetsomethingworking,submittoperforce o Havereasonablecheck-incomments
Points will be deducted if minimum is not reached
Write all programs in cross-platform C++
• Optimize for execution speed and robustness
• Working code doesn’t mean full credit
Submission Report
• Fill out the submission Report o Noreport,nograde
Code and project needs to compile and run
• Make sure that your program compiles and runs
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete
Submission Report SC 388/588
(Type in fields)
o Warninglevel4…
o NOWarningsorERRORS
Your code should be squeaky clean. o Codeneedstowork“as-is”.
No modifications to files or deleting files necessary to compile or run. o Allyourcodemustcompilefromperforcewithnomodifications.
Otherwise it’s a 0, no exceptions
Project needs to run to completion
• If it crashes for any reason…
o Itwillnotbegradedandyougeta0
No Containers
• NO STL allowed {Vector, Lists, Sets, etc…}
o Noautomaticcontainersorarrays
o Youneedtodothistheoldfashionway-YOUEARNEDIT
Leave Project Settings
• Do NOT change the project or warning level
o Anychangingoflevelorsuppressionofwarningsisanintegrityissue
Simple C++
• No modern C++
o NoLambdas,Autos,templates,etc… o NoBoost
• NO Streams
o Usedfopen,fread,fwrite…
• No code in MACROS
o Codeneedstobeincppfilestoseeanddebugiteasy
• Exception:
o implicit problem needs templates
Leaking Memory
• If the program leaks memory
o Thereisadeductionof20%ofgrade
• If a class creates an object using new/malloc o Itisresponsibleforitsdeletion
• Any MEMORY dynamically allocated that isn’t freed up is LEAKING o LeakingisHORRIBLE,soyoulosepoints
No Debug code or files disabled
• Make sure the program is returned to the original state
o Ifyouaddeddebugcode,pleasereturntooriginalstate
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete Submission Report
CSC 388/588 (Type in fields)
• If you disabled file, you need to re-enable the files
o Allfilesmustbeactivetogetcredit.
o Bettertolosepointsforunitteststhantodisableandloseallpoints
Allowed to Add files to this project
• This project will work “as-is” do not add files… Due Dates
• See Piazza for due date
• Submit program perforce in your student directory assignment supplied.
• Fill out your this MS2 pdf and add YouTube link
o ONLYuseAdobeReadertofilloutform,allotherswillberejected.
o Fillouttheformanddiscussionforfullcredit.
• Need to see discussion of code, compiling and demo in VIDEO
o Demo and explain each prototype feature:
YouTubeVideoDemo(publiclinkmustwork,nosigninrequired)
o Demo of the milestone
IfIdon’thearandseetheexplanation,Iassumeyoudidn’tdothefeature
Summary of Milestone
• Basics sound calls
o Vol,Panning,Pitch,Start,Stop,sounddurations,etc
• Stitching calls together by Voice Callbacks
• Priority System
• User Callbacks
• Async File loading
Do all your working in MS2 directory
Copy PA5 or PA6 to start the MS2 directory
You need to use FileSlow methods for milestone2
i. No other file system allowed
Make sure you submit this project many times to perforce as you develop i. You need to submit the project and the video for this milestone
Demo cannot LEAK resources or memory
Make sure you shut down all resources and threads correctly Add a special Key to kill the program before exit
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete
Submission Report SC 388/588
For Demo timing…
Use std::this_thread::sleep_for() to control the time… If you need to sequence actions in the demo
Do not have any Threads doing sleeps
Only sleeps used in the demo timing
Sound not specified
Default Attributes:
i. Vol: 70%
ii. Pan: Center
iii. Pitch: Original iv. Priority: 200
Playlists Loading
Loaded before Blocking before Demo starts Load this with your Blocking Wave loads
Deliverables
• Stand-alone C++ demo
o CreateademotoshowofftheALLoftheabovefeatures
(Type in fields)
Key Q – QUIT is a good choice
Then escape key to close the window
Need to see that there is no Memory Leaks on exit
o Useaudiosamplesthatallowyoutodemonstratetheabovefeatureseasily • Visual Studio 2019 Enterprise Edition
o C++warninglevel4
o Minimumcode,notemporariesorgenerateditems
o Needstobeabletocompileandrun“as-is”withoutcheckingoutfromperforceor
changing the attributes of the files
• For some people – the demo is hardest part of this exercise
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete CSC 388/588 (Type in fields)
Demo 1: BASICS
Demo 1: Basics
You need to use FileSlow methods for milestone2
All Sound wave assets need to be loaded/initiated from Game Side Setup:
• Given 5 simple mono wave samples o Sampledat48Khz,32-bit
• Create 5 separate simple playlists (scripts) – one sound wave, one sound ID o 101-Fiddle
o 102-Bassoon o 103–Oboe2 o 104-SongA o 105-SongB
Start Demo 1 –hit the “1” key to trigger it
• This is triggered in the update() method of the game o Readthekeyboardinput
o ThenloadandgowithyourDemo1
• The demo should play from there.
o Nouserinterventionneeded–justneedthetimertriggersworking Time (seconds)
Submission Report Load Load Load Load 101 102 103 104 105
0 3 6 10 15 20 25
101 101 101 102 102 103 103
Real-time Multithreaded Architecture Milestone
Snd_C Play 103 Pan center
Start vol : 100%
(every 1ms) read vol, add delta over 2 secs Final vol: 0%
Priorty: 200 Initiated on Game thread
Snd_C Play 103 Pan center
Start vol : 0%
(every 1ms) read vol, add delta over 2 secs Final vol: 100%
Priorty: 200 Initiated on Game thread
Snd_B Play 102 70% Vol
Start pan :100% right
smoothly (every 1ms) pan left over 2 secs Final pan: 100% left
Priorty: 200 Initiated on Game thread
Snd_B Play 102 70% Vol
Start pan :100% left
smoothly (every 1ms) pan right over 2 secs Final pan: 100% right
Priorty: 200 Initiated on Game thread
Snd_A Play 101 Pan 100% Right, 70% Vol Priorty: 200 Initiated on Game thread
Snd_A Play 101 Pan 100% left, 70% Vol Priorty: 200 Initiated on Game thread
Snd_A Play 101 Pan Center, 70% Vol Priorty: 200 Initiated on Game thread
Blocking Load 105 Initiated On Game thread
Blocking Load 104 Initiated On Game thread
Blocking Load 103 Initiated On Game thread
Blocking Load 102 Initiated On Game thread
Blocking Load 101 Initiated On Game thread
Real-time Multithreaded Architecture use Adobe Reader to complete
Submission Report SC 388/588
Part A: Load sounds
(Type in fields)
o AddDebug::out()toshowthecallonthecorrectthread When loaded start time demo
• In Demo (Start with a key press) o BlockingLoadingSnd101 o BlockingLoadingSnd102 o BlockingLoadingSnd103 o BlockingLoadingSnd104 o BlockingLoadingSnd105
• Debug printing for each load
o InitiateonGameThread
Part B: preset pan test
• Timer: 0 seconds
o Play101withpanincenter,vol70%
• Timer: 3 seconds
o Play101withpan100%left,vol70%
• Timer: 6 seconds
o Play101withpan100%right,vol70%
Part C: runtime panning adjustment with write only
• Timer: 10 seconds, vol 70%
o Play102withpan100%leftandmoveitto100%right
By setting the attribute directly
• Every 1ms change the panning…
o Smoothlyfor2seconds • Timer: 15 seconds, vol 70%
o Play102withpan100%rightandmoveitto100%left By setting the attribute directly
• Every 1ms change the panning o Smoothlyfor2seconds
Part D: runtime volume adjustment with a read modify write
• Timer: 20 seconds
o Play103withvolumeat0%andrampupthevolumesmoothlyto100% o Smoothlyacross2seconds
Do this by 1st – reading the current volume
Then add a delta to the volume and set the attribute directly
• Every 1ms change the volume
• Timer: 25 seconds
o Play103withvolumeat100%andrampdownthevolumesmoothlyto0% o Smoothlyacross2seconds
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete
Submission Report SC 388/588
(Type in fields)
Do this by 1st – reading the current volume
Then add a delta to the volume and set the attribute directly
• Every 1ms change the volume Part E: Stereo effect from mono
Time (seconds)
30 35 38 60 72
• Timer: 30 seconds
o Play104withpan100%left,vol70% o Play105withpan100%right,vol70%
• Timer: 35 seconds
o PrintintheDebugger’sOutputscreenthetime104hasbeenplayinginseconds
(since it started playing)
Need to use the system…no hard coding numbers
• Timer: 38 seconds
o PrintintheDebugger’sOutputthetime104hasbeenplayinginseconds (since it started playing)
Need to use the system…no hard coding numbers
• Timer: 60 seconds
o PrintintheDebugger’sOutputscreenthetime104hasbeenplayinginseconds (since it started playing)
Need to use the system…no hard coding numbers o Stop104
• Timer: 72 seconds
o PrintintheDebugger’sOutputscreenthetime105hasbeenplayinginseconds
(since it started playing)
Need to use the system…no hard coding numbers o Stop105
Priorty: 100 Initiated on Game thread
Debug::out() use the sysem Display how long 105 has been playing Initiated on Game thread
Priorty: 100 Initiated on Game thread
Debug::out() use the sysem Display how long 104 has been playing Initiated on Game thread
Debug::out() use the sysem Display how long 104 has been playing Initiated on Game thread
Debug::out() use the sysem Display how long 104 has been playing Initiated on Game thread
Snd_E Play 105 Pan 100% Right, 70% Vol Priorty: 200 Initiated on Game thread
Snd_D Play 104 Pan 100% Left, 70% Vol Priorty: 200 Initiated on Game thread
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture CSC 388/588
Part F: Instancing several sounds
use Adobe Reader to complete
(Type in fields)
Time (seconds)
Submission Report _I 102
• Timer: 80 seconds
o Snd_F=Start102
o setvolto40%
• Timer: 80.5 seconds
o Snd_G=Start102
o setvolto40%
• Timer: 81 seconds
o Snd_H=Start102
o setvolto40%
• Timer: 81.5 seconds
o Snd_I=Start102
o setvolto40%
• Timer: 81.5 seconds
o StopSnd_F o StopSnd_G o StopSnd_H
• Timer: 82 seconds and beyond
o LetSnd_I–playanddiewithoutintervention
Priorty: 200
Stop Snd_H
Initiated on Game thread
Priorty: 200
Stop Snd_G
Initiated on Game thread
Stop Snd_F
Initiated on Game thread
Priorty: 200
Snd_I Play 102 Pan center, 40% Vol
Priorty: 200 Initiated on Game thread Snd_H Play 102 Pan center, 40% Vol
Priorty: 200 Initiated on Game thread Snd_G Play 102 Pan center, 40% Vol
Priorty: 200 Initiated on Game thread
Snd_F Play 102 Pan center, 40% Vol Priorty: 200 Initiated on Game thread
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete CSC 388/588 (Type in fields)
Demo 2: Voice Stitching
Demo 2: Voice Stitching – using XAudio2 Callbacks
You need to use FileSlow methods for milestone2
All Sound wave assets need to be loaded/initiated from Game Side Setup:
• See above description on Seinfeld:
o Given8simplemonowavesamples
Sampled at 48Khz, 32-bit
• Create 8 separate simple waves
o Intro_mono o A_mono
o AtoB_mono o B_mono
o BtoC_mono o C_mono
o CtoA_mono o End_mono
• On controlling playlist
o SndID201–isthecontrollerforthisplaylist
Start Demo 2 –hit the “2” key to trigger it
• This is triggered in the update() method of the game o Readthekeyboardinput
o ThenloadandgowithyourDemo2
• The demo should play from there.
o Nouserinterventionneeded–justneedthetimertriggersworking.
• Print the name of each wave as it stitched in the XAudio2 Callback
o Sinceonlyonewaveisstitchedatatime
o Thenamesshouldbeprintedwiththecallback…
They shouldn’t be burst on the screen
Instead one at a time… with delays between them o UseDebug::out()fortheprinting
Submission Report Keenan
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture CSC 388/588
use Adobe Reader to complete
Submission Report Keenan
(Type in fields)
Time (seconds)
Voice Callback
Stream End Triggers next SrcVoice
Part A: Load sounds
o AddDebug::out()toshowthecallonthecorrectthread When loaded start time demo
• In Demo (Start with a key press)
o BlockingLoadingIntrowave
o BlockingLoadingAwave
o BlockingLoadingAtoBwave o BlockingLoadingBwave
o BlockingLoadingBtoCwave o BlockingLoadingCwave
o BlockingLoadingCtoAwave o BlockingLoadingEndwave
• Debug printing for each load
o InitiateonGameThread
Part B: Start the demo
• On the Game THREAD o At0seconds
Voice Callback
Stream End Triggers next SrcVoice
Play 201, pan center, volume 70%
• Print the name of each wave as it stitched in the XAudio2 Callback
Repeat pan Center,Right,Left Every 10 secs Until song finishes
Load wave Load wave Load wave Load wave Load wave Load wave Load wave Load wave
Blocking Load End Initiated On Game thread Blocking Load C to A Initiated On Game thread Blocking Load C Initiated On Game thread Blocking Load B to C Initiated On Game thread Blocking Load B Initiated On Game thread Blocking Load A to B Initiated On Game thread Blocking Load A Initiated On Game thread Blocking Load Intro Initiated On Game thread
Snd_A Pan Center
Priorty: 200 Initiated on Game thread
Snd_A Pan 100% Left
Priorty: 200 Initiated on Game thread
Snd_A Pan 100% Right Priorty: 200 Initiated on Game thread
Snd_A Pan Center
Priorty: 200 Initiated on Game thread
Snd_A Pan 100% Left
Priorty: 200 Initiated on Game thread
Snd_A Pan 100% Right Priorty: 200 Initiated on Game thread
Snd_A Pan Center
Priorty: 200 Initiated on Game thread
Snd_A Pan 100% Left
Priorty: 200 Initiated on Game thread
Snd_A Pan 100% Right Priorty: 200 Initiated on Game thread
Snd_A Play 201 Pan center, 70% Vol Priorty: 200 Initiated on Game thread
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete Submission Report
CSC 388/588
(Type in fields) Keenan
o Sinceonlyonewaveisstitchedatatime
o Thenamesshouldbeprintedatintervalsproportionaltothe
o At10seconds
Pan Right 201
o At20seconds
Pan Left 201
o At30seconds
Pan Center 201
• Repeat the panning pattern
o Center,Right,Left–10secondsapart
Do this until the audio ends
individual wave playback
They shouldn’t be burst on the screen
Instead one at a time… with delays between them
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete CSC 388/588 (Type in fields)
Demo 3: Priority
Demo 3: Priority
You need to use FileSlow methods for milestone2
All Sound wave assets need to be loaded/initiated from Game Side
• Given 1 simple mono wave samples o Sampledat48Khz,32-bit
Submission Report Keenan
• Create 1 separate simple playlists (scripts) – one sound wave, one sound ID o 301–Coma
• For DEMO reasons we are allowing a maximum of 6 sound calls at a time o Otherwisethisdemowouldbe2xlonger
• You need the ability to print to the output window the current status of each sound call o Handle,priority,timeplaying
Need handles – unique identifier
o Forexample:(3handles–intheactivetable)
——- Active Table ——————
0xAAAA0001: 10 0xAAAA0004: 50 0xAAAA0005: 75
1500 ms 1500 ms 200 ms
o UseDebug::out()
This shows the thread name as well…
• Sound call for this demo is more of a placeholder
o Keepthevolumedownto10%forallofthesecall o Lowernumberisthehigherpriority
Example: Snd_A 50 priority kills a Snd_X 75 priority
o IfSnd_AnewcallhasthesamepriorityofexistingSnd_X’spriority,
Kill the oldest sound call with the same priorty
• Call the SPECIAL loading file loading functions
o SincemanyhaveSolidStateDrive…weneedtosimulate Delay and latency of network or slow hard drive
o UsetheFILE_SLOWclasstosimulatelatency FileSlow::Open()
FileSlow::Read()
FileSlow::Seek()
FileSlow::Tell()
FileSlow::Close()
Real-time Multithreaded Architecture Milestone
Real-time Multithreaded Architecture use Adobe Reader to complete CSC 388/588 (Type in fields)
Start Demo 3 –hit the “3” key to trigger it
• This is triggered in the update() method of the game o Readthekeyboardinput
o ThenloadandgowithyourDemo3
• The demo should play from there.
o Nouserintervention
程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com