hello all,

so the driver completes inithardware, the streams are ready to go, but it’s 
panicking and there’s no printf to show where.

1. is it possible/likely it’s crashing because i have an empty 
getCurrentSampleFrame method?
        -probably?

2. the engine is asking me to return a single UInt32 value. what if i have 
multiple streams, though?
        -we would want to update the position of each active stream, would we 
not? 
                -this would require one UInt32 per stream.

this is done in the ALSA driver as follows:

> static snd_pcm_uframes_t oxygen_pointer(struct snd_pcm_substream *substream)
> {               
>         struct oxygen *chip = snd_pcm_substream_chip(substream);
>         struct snd_pcm_runtime *runtime = substream->runtime;
>         unsigned int channel = oxygen_substream_channel(substream);
>         u32 curr_addr;
>                  
>         /* no spinlock, this read should be atomic */
>         curr_addr = oxygen_read32(chip, channel_base_registers[channel]);
>         return bytes_to_frames(runtime, curr_addr - (u32)runtime->dma_addr);
> }                
> 

it seems ALSA passes the stream to the function and then it can be updated 
easily.

in the APPUL case, it does not seem like we know what stream we’re being asked 
to update. there are no parameters being passed.

in short: how can we update the position of multiple streams using the existing 
getCurrentSampleFrame prototype?

so close to getting this bad boy going (i think)!!

Thanks,
Gagan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to