Question about potential allocation issue #247
                  
                    
                      travisjayday
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment 1 reply
-
| 
         NullAudio only support 2 formats. 44.1k and 48k. Blackhole supports 44.1k, 48k, 88.2k, 96k, 176k, 192k. That’s where the difference between the 6 and the 2 comes from. Nothing to do with the number of channels.
Yup I know, it’s confusing.
Devin 
…On Dec 20, 2020, 5:39 PM -0800, Travis Ziegler ***@***.***>, wrote:
 Hi there,
 Let me preface this by saying I'm a noob at macOS ecosystem and I'm in the process of learning.
 I've been reading over the source code and I've noticed something that I don't understand. This might be a bug, not sure. Why do you only allocate 6 * sizeof(...) in Blackhole_GetStreamPropertyDataSize?
 https://github.com/ExistentialAudio/BlackHole/blob/21989c75ec0281c52f0e97d9e079490c087f21c3/BlackHole/BlackHole.c#L2457
 Should you not allocate NUM_CHANNELS * sizeof(...)? Is there a reason why 6?
 I'm asking because in the originall NullAudio.h example from Apple, they allocate 2 * sizeof(...)
 Maybe for two-channel audio?
 —
 You are receiving this because you are subscribed to this thread.
 Reply to this email directly, view it on GitHub, or unsubscribe. 
 | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
Let me preface this by saying I'm a noob at macOS ecosystem and I'm in the process of learning.
I've been reading over the source code and I've noticed something that I don't understand. This might be a bug, not sure. Why do you only allocate 6 * sizeof(...) in Blackhole_GetStreamPropertyDataSize?
BlackHole/BlackHole/BlackHole.c
Line 2457 in 21989c7
Should you not allocate NUM_CHANNELS * sizeof(...)? Is there a reason why 6?
I'm asking because in the originall NullAudio.h example from Apple, they allocate 2 * sizeof(...)
Maybe for two-channel audio?
Beta Was this translation helpful? Give feedback.
All reactions