Skip to content

Commit

Permalink
wednesday again
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyjer committed Apr 25, 2024
1 parent 2332c71 commit c9b60b1
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 3 deletions.
Binary file modified kernel/build/kernel.bin
Binary file not shown.
Binary file modified kernel/build/kernel.img
Binary file not shown.
Binary file modified kernel/build/kernel.kernel
Binary file not shown.
2 changes: 1 addition & 1 deletion kernel/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kernel/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Process
Shared<Semaphore> sems[NSEM]{};
Shared<Future<uint32_t>> children[NCHILD]{};
BlockingLock mutex{};
AC97::BufferDescriptor audio_buffers[NBUFFERS]{};
AC97::BufferDescriptor* audio_buffers;
bool setupBuffers = false;

int getChildIndex(int id);
Expand Down
Binary file modified t0.data
Binary file not shown.
Binary file modified t0.dir/sbin/init
Binary file not shown.
2 changes: 1 addition & 1 deletion t0.dir/sbin/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit c9b60b1

Please sign in to comment.