diff --git a/kernel/build/kernel.bin b/kernel/build/kernel.bin index 84e4c0e..6830127 100755 Binary files a/kernel/build/kernel.bin and b/kernel/build/kernel.bin differ diff --git a/kernel/build/kernel.img b/kernel/build/kernel.img index c4baaea..ee50c91 100644 Binary files a/kernel/build/kernel.img and b/kernel/build/kernel.img differ diff --git a/kernel/build/kernel.kernel b/kernel/build/kernel.kernel index c89e444..21b3bea 100755 Binary files a/kernel/build/kernel.kernel and b/kernel/build/kernel.kernel differ diff --git a/kernel/process.cc b/kernel/process.cc index d05c81b..d40ade8 100644 --- a/kernel/process.cc +++ b/kernel/process.cc @@ -40,9 +40,9 @@ void Process::setupDMABuffers(uint32_t nabm_base) if (setupBuffers) { return; } + audio_buffers = new AC97::BufferDescriptor[NUM_BUFFERS]; for (uint32_t i = 0; i < NUM_BUFFERS; i++) { - audio_buffers[i] = *(new AC97::BufferDescriptor); audio_buffers[i].pointer = (uint32_t) new char[BUFFER_SIZE]; audio_buffers[i].length = BUFFER_SIZE; audio_buffers[i].control = 0; // Set appropriate control flags based on hardware spec diff --git a/kernel/process.h b/kernel/process.h index da603da..3707827 100644 --- a/kernel/process.h +++ b/kernel/process.h @@ -42,7 +42,7 @@ class Process Shared sems[NSEM]{}; Shared> children[NCHILD]{}; BlockingLock mutex{}; - AC97::BufferDescriptor audio_buffers[NBUFFERS]{}; + AC97::BufferDescriptor* audio_buffers; bool setupBuffers = false; int getChildIndex(int id); diff --git a/t0.data b/t0.data index 6d24eaf..b269878 100644 Binary files a/t0.data and b/t0.data differ diff --git a/t0.dir/sbin/init b/t0.dir/sbin/init index 0b28237..98317bc 100755 Binary files a/t0.dir/sbin/init and b/t0.dir/sbin/init differ diff --git a/t0.dir/sbin/init.c b/t0.dir/sbin/init.c index 0363c10..de35707 100644 --- a/t0.dir/sbin/init.c +++ b/t0.dir/sbin/init.c @@ -11,7 +11,7 @@ int main(int argc, char **argv) { - int fd = open("/data/short.wav", 0); + int fd = open("/data/audiofile.wav", 0); play_audio(fd); printf("Exited sys call.\n");